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/2009-October/092948.html below:

[Python-Dev] Weak dict iterators are fragile

[Python-Dev] Weak dict iterators are fragile [Python-Dev] Weak dict iterators are fragileAntoine Pitrou solipsis at pitrou.net
Sun Oct 11 18:26:21 CEST 2009
Antoine Pitrou <solipsis <at> pitrou.net> writes:
> 
> 1. Add the safe methods listkeys(), listitems(), listvalues() which would 
> behave as the keys(), etc. methods from 2.x
> 
> 2. Make it so that keys(), items(), values() atomically build a list of 
> items internally, which makes them more costly for large weak dicts, but 
> robust.

And a third one (a bit more complicated implementation-wise):

3. Delay weak dict removals until any iteration has finished.

Regards

Antoine.


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