PEP 276 Simple Iterator for ints

Skip Montanaro skip at pobox.com
Wed Nov 14 04:30:15 EST 2001


    Skip>     for i in 10:
    Skip>       i = -i            # for i in range(0, -10, -1)
    ...
    Skip> Taking that one gruesome step farther, one could envision a further
    Skip> extension to for loops:

    Skip>     for i=-i in 10:
    Skip>       ...

Though after reading the remainder of the thread, I like the Haskell syntax
best.

S





More information about the Python-list mailing list