Property access instead of getters/setters

I just added “sequence properties”, which replace methods like:

node.get_num_children()
node.get_child(i)
node.set_child(i, node2)
node.remove_child(i)

with:

len(node.children)
node.children[i]
node.children[i] = node2
del node.children[i]

Up next: map properties, so you will be able to do node.python_tags[“something”] = “else”.

1 Like