From: Stefan Behnel Date: Sun, 21 Nov 2010 07:19:02 +0000 (+0100) Subject: test for ticket #537 X-Git-Tag: 0.14.alpha0~108 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9785287b3ae00c7bff3cd777f2931f54d359c344;p=cython.git test for ticket #537 --- diff --git a/tests/run/closure_name_mangling_T537.pyx b/tests/run/closure_name_mangling_T537.pyx new file mode 100644 index 00000000..f874ce14 --- /dev/null +++ b/tests/run/closure_name_mangling_T537.pyx @@ -0,0 +1,23 @@ + +__doc__ = u""" +>>> f1 = nested1() +>>> f2 = nested2() +>>> f1 == f2 # inner functions (f) +False +>>> f1() == f2() # inner-inner functions (g) +False +""" + +def nested1(): + def f(): + def g(): + pass + return g + return f + +def nested2(): + def f(): + def g(): + pass + return g + return f