Implementing getter for vector of class instances (without copy) #3223
Answered
by
adamreichold
chrisjsewell
asked this question in
Questions
Replies: 1 comment 8 replies
-
It depends, if you want to share access to the nodes with Python code, you probably to store it in Additionally and orthogonally to that, you could turn |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Heya, given the following class, how can I expose the
children
attribute in Python?I know I can do the following, but then it is always creating new copies of the nodes and I want just the references:
For bonus points, I would also like to implement a
walk
method to iterate overNode
references in the treeBeta Was this translation helpful? Give feedback.
All reactions