caesar0301 / treelib

An efficient implementation of tree data structure in python 2/3.
http://treelib.readthedocs.io/en/latest/
Other
801 stars 185 forks source link

Tree.__contains__ rationale #110

Closed cowo78 closed 4 years ago

cowo78 commented 5 years ago

I see that Tree.__contains__ current implementation is:

return [node for node in self._nodes
            if node == identifier]

If I am not mistaken this:

This is also trivial to fix and I can provide a patch, unless there's something I am missing

leonardbinet commented 4 years ago

@cowo78, good point, this has been fixed in https://github.com/caesar0301/treelib/pull/129/