[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

Raymond Hettinger report at bugs.python.org
Sat Oct 11 19:10:02 CEST 2014


Raymond Hettinger added the comment:

I'll spend some time taking this one under consideration.

Keyword arguments for dicts and dict-like classes are already somewhat limited (only non-keyword identifiers) that why Guido resisted adding them in the first place.   And, in the context of OrderedDicts, they aren't really useful at all (because the order gets scrambled).

I'm reluctant to make the number of changes required in order to support this corner case.  The ship for Python 2.7 sailed a long time ago and it is risky to make changes like this.  After the patch, the code is less readable, harder to get right, harder to maintain, and not as performant.

On the other hand, adding "self" would be a nice-to-have, so it is worth thinking about.

----------
priority: normal -> low

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


More information about the Python-bugs-list mailing list