Closed leonardbinet closed 4 years ago
removed no-longer supported versions on python
Hi @leonardbinet ,
It is really a nice idea toget shallow copy of subtree
. I was excited with your proposal in email before dealing with this pull request. However this implementation requires more consideration as it will break the compatibility I have been keeping for a long time. Dependencies from some existing projects invoking API bpointer
and fpointer
will be broken unexpectedly.
Let's find out a more compatible version for this feature?
Xiaming
@caesar0301 indeed I'll think about that
@caesar0301 I've updated PR to avoid any breaking change, + minor correction on __contains__
method (must return boolean)
hi @caesar0301, have you had time to have a look? thx in advance!
@alk-lbinet Sorry for delayed response. Busy with some work. Could you give a merge into branch feature/tree-wise-node-pointer
? I have some idea to try a tider and more unified API based on your improvement. Thanks!
@caesar0301 I've created a PR on the feature/tree-wise-node-pointer
branch (https://github.com/caesar0301/treelib/pull/126), but having no access on your repo I cannot merge though 🙂 , looking forward to seeing the unified API!
@leonardbinet Thank you. Close this issue for now. Let's work on the new branch (#126 ) and Issue https://github.com/caesar0301/treelib/issues/127
I encountered the following conditions:
The only solution I had was to create for each subtree a deepcopy, but it was very greedy and expensive in terms of memory.
This pull-request implements the ability to generate shallow copies of trees (no deep-copy of nodes), and mutate multiple shallow copies of the same tree without impacting other trees hierarchies.
I do so by assigning
Nodes
not a single_bpointer
_fpointer
, but one per shallow copy of tree.