Re: difference with parenthese

2016-10-17 Thread chenyong20000
Hi Wolfgang, thanks for your kind reply. I got. regards skyworld -- https://mail.python.org/mailman/listinfo/python-list

Re: difference with parenthese

2016-10-17 Thread Wolfgang Maier
On 17.10.2016 16:45, chenyong20...@gmail.com wrote: Hi Wolfgang, thanks for your kind reply. I try to explain what I got from your reply: for code1, when running "foo = outer()", since outer() is callable, function outer() is running and it returns an object, which referring to function inner(

Re: difference with parenthese

2016-10-17 Thread chenyong20000
Hi Wolfgang, thanks for your kind reply. I try to explain what I got from your reply: for code1, when running "foo = outer()", since outer() is callable, function outer() is running and it returns an object, which referring to function inner(). When "foo" is running, it indicates it is referrin

Re: difference with parenthese

2016-10-17 Thread Wolfgang Maier
On 17.10.2016 10:52, chenyong20...@gmail.com wrote: Hi, i'm confused by a piece of code with parenthese as this: code 1-- def outer(): ... def inner(): ... print 'inside inner' ... return inner ... foo = outer() foo foo() inside inner