A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-December/146972.html below:

[Python-Dev] Making sure dictionary adds/deletes during iteration always raise exception

[Python-Dev] Making sure dictionary adds/deletes during iteration always raise exception [Python-Dev] Making sure dictionary adds/deletes during iteration always raise exceptionRaymond Hettinger raymond.hettinger at gmail.com
Tue Dec 13 11:42:27 EST 2016
> On Dec 13, 2016, at 1:51 AM, Max Moroz <maxmoroz at gmail.com> wrote:
> 
> Would it be worth ensuring that an exception is ALWAYS raised if a key
> is added to or deleted from a dictionary during iteration?
> <snip>
> I suspect the cost of a more comprehensive error reporting is not
> worth the benefit, but I thought I'd ask anyway.

I think what we have has proven itself to be good enough to detect the common cases, and it isn't worth it to have dicts grow an extra field which has to be checked or updated on every operation.


Raymond

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4