Simon Forman <sajmik...@gmail.com> writes: > BTW, Paul, kind of a tangent: I reimplemented the same algorithm but > using tuples instead of instances (and empty tuples for "NULL" > values.) I was trying to mess around in the space you seemed to > indicate existed, i.e. a better implementation using other datatypes, > but I didn't have a clear idea what I was doing and, as I said, I > started by simply re-implementing with a different datatype. > > Much to my surprise and delight, I discovered the tuple-based BTree > was /already/ a "persistent data type"! It was both awesome and a bit > of an anti-climax. :]
Cool ;-). It also seems to me a bit irregular to require every tree to have a node with optional children, rather than allowing trees to be compleely empty. I think the irregularity complicated the code somewhat. -- http://mail.python.org/mailman/listinfo/python-list