[issue18986] Add a case-insensitive case-preserving dict

Serhiy Storchaka report at bugs.python.org
Fri Sep 13 21:52:19 CEST 2013


Serhiy Storchaka added the comment:

Here is an alternative C implementation. It adds to the dict class support of the __transform__() method. If this method is defined in dict subclass it used to transforming keys. collections.TransformDict is just utilizes this feature as collections.defaultdict utilizes __missing__(). This patch changes twice less C code than previous one (227 vs 474 lines).

----------
Added file: http://bugs.python.org/file31749/dict__transform__.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18986>
_______________________________________


More information about the Python-bugs-list mailing list