Python 2.2 code continues running before list comprehension is completed?

Heiko Wundram heikowu at ceosg.de
Mon Jul 19 11:14:25 EDT 2004


Am Montag, 19. Juli 2004 16:25 schrieb Chris P.:
> Any help with a solution or workaround will be greatly appreciated,

IIRC, Python 2.2 didn't support list comprehensions (feature new as of 2.3), 
so you'll have to work around that by creating some form of simple for loop 
which does what you want, esp. considering that VARIOUS CONDITIONS ON x seems 
to be a lot more than just a simple check (which will make the code a 
helluvalot cleaner if spelled out).

Heiko.



More information about the Python-list mailing list