Accessing Function Variables from Sub-functions

Terry Reedy tjreedy at udel.edu
Thu Oct 11 15:46:17 EDT 2007


"Licheng Fang" <fanglicheng at gmail.com> wrote in message 
news:1192097504.394834.184930 at o3g2000hsb.googlegroups.com...
| Sorry to dig up this old thread, but I would like to know what's the
| rationale is. Why can't a nested function rebind a variable of an
| outer function?

Because it is debateble whether this is overall a good idea and because it 
was not obvious exactly how to do so.  (There were about 10 different 
proposals.)  I believe an addition is scheduled for 3.0 (and 2.6 I 
suspect). 






More information about the Python-list mailing list