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 <rep...@bugs.python.org>
<http://bugs.python.org/issue18986>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to