delb-py
delb-py copied to clipboard
Let node inserting methods return the actually inserted nodes
delb allows to insert text and tag nodes that are created by the inserting routine from non-node data structures (that are strings and reusable definitions created with the tag function). thus users must find some adequate query to get a reference to the newly created nodes if they need them.
therefore all node inserting (except the replacing) should return the actual node(s) that were created so that users can easily process these further. e.g.:
dummy = tag("item", {"ref" = ""})
new_item = node.append_child(dummy)
new_item["ref"] = url
i'm conflicted regarding a milestone for this. i consider this behaviour essential and the current lack of it a design flaw. however i anticipate this to be significantly easier to implement when the native data model implementation is in place.