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

__setitem__ will break bpointers/fpointer #151

Closed leonardbinet closed 4 years ago

leonardbinet commented 4 years ago

In Tree class, this setter doesn't seem right to me:

    def __setitem__(self, key, item):
        """Set _nodes[key]"""
        self._nodes.update({key: item})

Two issues:

Do you have a specific use case in mind?

IMHO we should remove this method which can be misleading for developers.