[issue14205] Raise an error if a dict is modified during a lookup

Mark Shannon report at bugs.python.org
Tue Mar 6 00:28:57 CET 2012


Mark Shannon <mark at hotpy.org> added the comment:

I much prefer dict_lookup.patch to nomodify.patch.
It doesn't increase the memory use of dict. One extra word per dict could be a lot of memory for a large application.

There is a very subtle semantic change, but I think it is a positive one.
Raising a runtimne seesm sensible as the dict iterators already raise a RuntimeError if the size of the dict changes.

----------
nosy: +Mark.Shannon

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


More information about the Python-bugs-list mailing list