Nested Mapping
Raymond Hettinger
python at rcn.com
Thu Oct 21 19:44:51 EDT 2010
On Oct 21, 4:28 pm, Paul Rubin <no.em... at nospam.invalid> wrote:
> Raymond Hettinger <pyt... at rcn.com> writes:
> What I really want is a Haskell-like persistent (i.e. purely functional)
> dictionary implemented as an AVL tree or something like that.
Hopefully, that discussion can be in a separate thread.
This is really about keeping all the nice O(1) characteristics
of dicts and keeping their straight-forward API while adding
the ability to support nested lookups.
An AVL tree has different performance characteristics (like O(log n)
search and has a substantially different API (adding ordering
operations)
and works on different data types (relying on total ordering rather
than hashing an equality). Also, having a persistence is a different
requirement.
Sorry for the brush-off, but it would be ashamed if this thread got
immediately hijacked, and I were to lose possible feedback on the
API for nested mappings.
Raymond
More information about the Python-list
mailing list