A quirk/gotcha of for i, x in enumerate(seq) when seq is empty
Peter Otten
__peter__ at web.de
Fri Feb 24 08:14:12 EST 2012
More information about the Python-list mailing list
Fri Feb 24 08:14:12 EST 2012
- Previous message (by thread): A quirk/gotcha of for i, x in enumerate(seq) when seq is empty
- Next message (by thread): A quirk/gotcha of for i, x in enumerate(seq) when seq is empty
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Peter Otten wrote: > The code in the else suite executes only when the for loop is left via > break. Oops, the following statement is nonsense: > A non-empty iterable is required but not sufficient. Let me try again: A non-empty iterable is required but not sufficient to *skip* the else-suite of a for loop.
- Previous message (by thread): A quirk/gotcha of for i, x in enumerate(seq) when seq is empty
- Next message (by thread): A quirk/gotcha of for i, x in enumerate(seq) when seq is empty
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list