for in sequence problem... possible new operator to add to python

Terry Reedy tjreedy at udel.edu
Thu Jul 10 23:30:55 CEST 2003


"Adam Gent" <agentgt at yahoo.com> wrote in message
news:3a8fc6c5.0307100816.634c83a3 at posting.google.com...
> However I want b [in 'for b in somedict']  to be the values with out
doing:
> for b in bl.values()

If you succeed in subverting the standard idiom, you succeed in making
your code misleading for anyone else who ever reads it.  You may also
succeed in hindering yourself from either learning the standard idiom
and understanding others' code or in understanding your own code if
you subvert it sometimes and sometimes not.  Seems like a bad idea to
me.

Terry J. Reedy






More information about the Python-list mailing list