[issue5973] re-usable generators / generator expressions should return iterables

2009-05-08 Thread Sven Rahmann
New submission from Sven Rahmann : The syntax of generator expressions suggests that they can be used similarly to lists (at least when iterated over). However, as was pointed out to me, the resulting generators are iterators and can be used only once. This is inconvenient in situations where

[issue5968] Generator expression bug?

2009-05-08 Thread Sven Rahmann
Sven Rahmann added the comment: I complete agree that by x = (z for z in y) I create and assign a generator object to x. I'm afraid I disagree about "not a doc bug". The documentation for "for" reads: === for_stmt ::= "for" target_list "in" e

[issue5968] Generator expression bug?

2009-05-08 Thread Sven Rahmann
New submission from Sven Rahmann : Lists from list comprehensions and generator objects from generator expressions behave differently when we repeatedly want to iterate over them. This may or may not be a bug, but it is certainly not clear from the documentation (see documentation of &quo