A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2014-April/134233.html below:

[Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods

[Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods [Python-Dev] PEP 469: Restoring the iterkeys/values/items() methodsEthan Furman ethan at stoneleaf.us
Mon Apr 21 17:23:42 CEST 2014
On 04/20/2014 10:39 PM, Nick Coghlan wrote:
> Lists as mutable snapshots
> --------------------------
>
[...]
>
> The semantic equivalent of these operations in Python 3 are
> ``list(d.keys())``, ``list(d.values())`` and ``list(d.iteritems())``.

Last item should be ``list(d.items())``.


> Iterator objects
> ----------------
>
[...]
>
> In Python 3, direct iteration over mappings works the same way as it does
> in Python 2. There are no method based equivalents - the semantic equivalents
> of ``d.itervalues()`` and ``d.iteritems()`` in Python 3 are
> ``iter(d.values())`` and ``iter(d.iteritems())``.


``iter(d.items())``.


Thanks again, Nick.

--
~Ethan~
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