On Fri, May 21, 2010 at 3:16 AM, Lisandro Dalcin <[email protected]> wrote:
>> BTW, just spotted a closure bug, this won't compile (reports
>> '__pyx_outer_scope' redeclared):
>>
>> def nested1():
>>    def f():
>>        def g1():
>>            pass
>>
>> def nested2():
>>    def f():
>>        def g2():
>>            pass
>>
>> Seems some name mangling problem. I traced to
>> CreateClosureClasses.create_class_from_scope() in
>> ParseTreeTransform.py then didn't get the idea yet.
>>
>
> Does this occur if you write def f2(): ... (instead of def f():...)
> in nested2() ? Could the bug be related to f()'s having the same name?
>
>
>

Yes, the two f() have the same cname. Probably need to mangle the
cname at here.


-- 
Haoyu BAI
School of Computing,
National University of Singapore.
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to