vortec / libtree

Python Tree Library
MIT License
78 stars 3 forks source link

Make core API work with integers only #3

Open vortec opened 8 years ago

vortec commented 8 years ago

All core API functions accept two types to reference a node in the database: NodeData and integer.

Because the database doesn't understand our types :-) this means every function has to type check and convert passed NodeData objects into integers. This adds overhead, makes the code harder to read and possibly introduces type bugs.

Because we now have the wrapper objects, this convenience feature has become obsolete. I think it's a good idea to make all functions work with integers only and remove the possibility to pass in NodeData objects.

jameshy commented 8 years ago

I agree.