Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:

The behavior is a PITA.  It means that dict subclasses the redefine
__setitem__ have unpleasant pickling challenges.  The __setitem__
insertions are called before the subclass can initialize.

The workaround involves a funky dance using __reduce__.  See
collections.OrderedDict::__reduce__() for an example.

----------
nosy: +rhettinger
priority: low -> normal

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4712>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to