[issue25410] Clean up and fix OrderedDict

Eric Snow report at bugs.python.org
Fri Oct 16 21:07:00 EDT 2015


Eric Snow added the comment:

Thanks for working on this, Serhiy.  I've left a review.

As to the points you outlined, I have concerns with the impact of #3 and #5 on subclasses.  Notably od.__class__ is not necessarily the same as type(od).  Also #7 may introduce an unhandled re-entrancy, causing potentially incorrect outcomes.

Also note that I was extremely careful to (almost) exactly match the pure Python implementation.  Not only did this guarantee equivalent behavior, but it simplified the porting effort.  I'm not opposed to deviating from the pure Python implementation as long as the behavior remains exactly the same.  So if you want to change the behavior of OrderedDict you must be sure to make the equivalent change in the pure Python implementation (with the associated backward-compatibility constraints).  Thanks again for working on this though.

----------

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


More information about the Python-bugs-list mailing list