[Python-ideas] while conditional in list comprehension ?? (original) (raw)
Wolfgang Maier wolfgang.maier at biologie.uni-freiburg.de
Tue Jan 29 15:36:40 CET 2013
- Previous message: [Python-ideas] while conditional in list comprehension ??
- Next message: [Python-ideas] while conditional in list comprehension ??
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Are you trying to say you entered that code and it ran? I would be very surprised: if you could simply 'raise StopIteration' within the 'if' clause then there would be no point to the discussion. But as it is, your StopIteration should not be caught by the 'for', but will be raised directly. Did you try running it?
Sorry, I missed your enclosing list(), which explains things of course. Cheers, Wolfgang
- Previous message: [Python-ideas] while conditional in list comprehension ??
- Next message: [Python-ideas] while conditional in list comprehension ??
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]