caesar0301 / treelib

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

Starting from treelib==1.2.5 Node.tag is not an Python object anymore but a string #21

Closed Natim closed 10 years ago

Natim commented 10 years ago

See : https://github.com/caesar0301/pyTree/blob/master/treelib/node.py#L18

Natim commented 10 years ago

I've seen the Advanced Usage article : https://github.com/caesar0301/pyTree#advanced-usage

But the example seams broken to me, moreover why are you talking about data and not about tag anymore?

caesar0301 commented 10 years ago

I do not think treating a complicated data as tag is good practice. But it has little harm to make it as a general data type. (done) Thanks.

Jamin

Natim commented 10 years ago

Fixed in https://github.com/caesar0301/pyTree/commit/fd205440336469879ae7bed0a26ec7b78ee55104

Thanks.

Natim commented 10 years ago

Actually sanitize_id still raise an exception about this: https://github.com/caesar0301/pyTree/blob/fd205440336469879ae7bed0a26ec7b78ee55104/treelib/node.py#L39

caesar0301 commented 10 years ago

I guess you are talking about the issue addressed in #20.

Jamin

Natim commented 10 years ago

Well yes it seams you are right.