Author jiwon
Recipients
Date 2004-03-16.16:24:52
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=595483

ah, the following bug was due to the patch I uploaded
2004-02-04 15:13.

In order to get an error instantly from an expression like
"g=(x for x in None)", I made it equivalent to,

def __gen(_[1]):
    for x in _[1]:
        yield x
g=__gen(iter(None)) 
                 ^^^^

But when there is two or more iterator expression of same
symbol(or string), that patch produces error, because
currently, "((x, y) for x in 'abcd' for y in 'abcd') " is
equivalent to,

def __gen(_[1]):
    for x in _[1]:
        for y in _[1]:
            yield (x,y)

g = __gen(iter("abcd")) # passing only one parameter

I could make it pass every iterator expressions respectively
 even when they are same symbol(or string, ...), but for
now, I just dropped that patch (patch of 2004-02-04) since
that's the simplest thing now. If somebody says getting
instance error for cases like "(x for x in None)" is
important, I'll make another patch for it.

Btw, added more test case that covers what perky mentioned.
History
Date User Action Args
2007-08-23 15:31:38adminlinkissue872326 messages
2007-08-23 15:31:38admincreate