Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 7a0a80e

Browse files
author
Juanjo Alvarez
committed
Restore deleted comment
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
1 parent 99bd4d8 commit 7a0a80e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

bblfsh/node.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ def offset(self) -> int:
4444
def offset(self, v: int) -> None:
4545
self._parent_pos["offset"] = v
4646

47-
47+
# This is for v1 "node.children" compatibility. It will update the children
48+
# property with the dict or Node objects in properties or list/tuple properties
49+
# when .children is accessed (because the user could change the node using get_dict()
50+
# or .properties).
51+
# Also, all these " in children" are O(1) so this will be slow for frequently accessing
52+
# the children property on big nodes.
4853
class CompatChildren(MutableSequence):
4954
def __init__(self, parent: "Node") -> None:
5055
self._par_dict = parent.get_dict()

0 commit comments

Comments
 (0)