[issue25315] Make it clear in the collections Python source code that OrderedDict may be overridden

Raymond Hettinger report at bugs.python.org
Wed Oct 7 21:18:25 EDT 2015


Raymond Hettinger added the comment:

> What I'm suggesting it would be worth adding to the source code is
> a simple comment before the class definition for OrderedDict that
> says  "This Python code may be overridden by an accelerated 
> version of this class." 

Sorry, I disagree.  We've never had to do that for any of the C accelerator code in Python's history.  Also, we already have a comment at the point the import is done (and that didn't seem to matter to the OP who is just mad about the design choice itself).  The comment is in the same place as it is in heapq.py for example.  If you want to add a general FAQ entry, that would be fine.  Also, keep in mind that that the code is tested in our test suite, and it is active in other versions of Python (it is not useless as the OP suggests).

----------

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


More information about the Python-bugs-list mailing list