Skip to content

Facing problem while creating a tree from a nested recursive dictionary #234

Answered by kayjan
chaihub asked this question in Questions
Discussion options

You must be logged in to vote

Hello, this is intended as name is a special keyword when creating Node object. This prevents having name as a keyword/identifier, and having name again as an attribute.

In your case, if the unique key is id, when performing nested_dict_to_tree operation, the name of the Node reads from id under the hood, which clashes with the name attribute that you have. Happy to consider how else to handle this better because of the special keyword constraint from Node itself.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chaihub
Comment options

Answer selected by chaihub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants