[issue18986] Add a case-insensitive case-preserving dict
Antoine Pitrou
report at bugs.python.org
Mon Sep 9 22:44:59 CEST 2013
Antoine Pitrou added the comment:
> I also note that defaultdict is implemented via a special method on
> dict itself (__missing__), and if this one was implemented the same
> way it would be easy to combine the features.
It's not that simple: to remember the original casing you need either a
second container, or to use (original_key, value) tuples as values. Both
approaches have non-trivial repercussions on the implementation of many
methods.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18986>
_______________________________________
More information about the Python-bugs-list
mailing list