Author hyeshik.chang
Recipients
Date 2004-03-21.17:38:24
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=55188

Agreed. I'd prefer the current implementation's behavor
rather than defined in PEP289. Yes, It's incompatible with
list comprehensions but generator expressions are already
quite different enough from it. :)

How about to change PEP289's genexpr semantics to this?

g = (x**2 for x in range(10))
print g.next()

is equivalent to:

def __gen(_i1):
    for x in _i1:
        yield x**2
g = __gen(range(10))
print g.next()
History
Date User Action Args
2007-08-23 15:31:38adminlinkissue872326 messages
2007-08-23 15:31:38admincreate