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

Stephen J. Turnbull stephen at xemacs.org
Sun Apr 20 02:56:24 CEST 2014


Greg Ewing writes:

 > Maybe what's wanted is a function analogous to enumerate() for
 > mappings instead of sequences. Picking a semi-arbitrary name
 > for now:
 > 
 >     for k, v in tabulate(d):

I thought this already existed in six, though, with a name that is
familiar to Python 2 programmers and not requiring a mental gear
change to recall semantics:

    for k,v in six.iteritems(d):



More information about the Python-Dev mailing list