[issue19414] OrderedDict.values() behavior for modified instance
Nikolaus Rath
report at bugs.python.org
Wed Oct 30 17:32:19 CET 2013
Nikolaus Rath added the comment:
I agree that OrderedDict is more a dict than a list, but it is not clear to me why this means that it cannot extend a dict's functionality in that respect.
OrderedDict already adds functionality to dict (preserving the order), so why shouldn't it also allow changes during iteration?
I think these two things actually come together quite naturally, since it is the existence of an ordering that makes the behavior under changes during iteration well defined.
Is there really a danger that people will get confused because a previously undefined operation now becomes officially supported with a defined meaning?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19414>
_______________________________________
More information about the Python-bugs-list
mailing list