A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/102675.html below:

iterating through humongously large key lists!!

iterating through humongously large key lists!! iterating through humongously large key lists!!Alex Martelli aleaxit at yahoo.com
Wed Apr 25 10:04:58 EDT 2001
"Mark blobby Robinson" <m.1.robinson at herts.ac.uk> wrote in message
news:3AE69EF6.46C74A31 at herts.ac.uk...
> Is it is possible to interate through the keys of a dictionary object
> without loading the entire key list into memory? I am working with a

Not right now, although .popitem does something similar (but
destructively on the directory you're iterating on).

> situation where I need to interate through a dictionary containly
> routinely millions and potentually many millions of keys. Not only is it
> painfully slow to generate the list, but it eats into my memory
> significantly too. Please tell me there is a better way.

I think the iterators in 2.2 will satisfy your request.


Alex




More information about the Python-list 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