Re: Local variable in a closure

2013-08-18 Thread Terry Reedy
On 8/18/2013 6:44 AM, Dave Angel wrote: w.w.mil...@googlemail.com wrote: Is f local or not? http://pastebin.com/AKDJrbDs Please have a little respect, and include the source in your message. You managed quite nicely to keep it small, but you put it in an obscure place that some people won't b

Re: Local variable in a closure

2013-08-18 Thread Dave Angel
w.w.mil...@googlemail.com wrote: > Is f local or not? > http://pastebin.com/AKDJrbDs Please have a little respect, and include the source in your message. You managed quite nicely to keep it small, but you put it in an obscure place that some people won't be able to reach, and that might not sur

Re: Local variable in a closure

2013-08-18 Thread Ian Kelly
f is nonlocal to times(), local to multiplier(). As the docs for the locals() function say, "Free variables are returned by locals() when it is called in function blocks, but not in class blocks." On Sun, Aug 18, 2013 at 3:41 AM, wrote: > Is f local or not? > http://pastebin.com/AKDJrbDs > -- >

Re: Local variable in a closure

2013-08-18 Thread Chris Angelico
On Sun, Aug 18, 2013 at 10:41 AM, wrote: > Is f local or not? > http://pastebin.com/AKDJrbDs With something that short, it'd be easier to simply paste it straight into your post, rather than having it off elsewhere. But to answer your question: It is its own kind of beast. You can play around wi

Local variable in a closure

2013-08-18 Thread w . w . milner
Is f local or not? http://pastebin.com/AKDJrbDs -- http://mail.python.org/mailman/listinfo/python-list