Python 2.2 code continues running before list comprehension is completed?

Heiko Wundram heikowu at ceosg.de
Mon Jul 19 19:34:07 CEST 2004


Am Montag, 19. Juli 2004 18:31 schrieb Peter Otten:
> Python 2.2.1 (#1, Sep 10 2002, 17:49:17)
> [GCC 3.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> [c for c in "you are wrong"][-5:]
>
> ['w', 'r', 'o', 'n', 'g']

Humm... Okay, I don't have an installation of 2.2 around anymore, so I 
couldn't check before I posted... ;) Forgive my faux pas. ;)

Heiko.



More information about the Python-list mailing list