Closed b4hand closed 10 years ago
I think that's a good idea.
It seems it is better to still support "raw" int values (maybe in a base class) because this is more memory efficient when the values are ints.
Yeah, I figured I'd rename the current Trie class to IntTrie or something similar and then add a new Trie class that allows arbitrary value storage.
That would be perfect.
I was curious if there was any particular reason you don't allow storing arbitrary Python objects as values?
It looks like the underlying C library just stores
unsigned long
asvalue_t
, but it seems like you could store aPyObject *
by simply casting it tovalue_t
.