magical expanding hash
Paul Rubin
http
Tue Jan 17 16:45:44 EST 2006
"braver" <deliverable at gmail.com> writes:
> Exactly, << as in C++/ruby streams. But notice the extra checks needed
> to see whether we want a new leaf which is an array or a number, or we
> create an intermediate hash level. Would the checks look the same in
> python?
You could check what is being shifted and make a new leaf of the
appropriate type. If you put a number there though, you wouldn't be
able to then add more nodes beneath that number.
More information about the Python-list
mailing list