Jan Grant wrote: > On Wed, 1 Nov 2006, Steven Bethard wrote: > >> I don't think that'll really be worth it. I'd be amazed if people >> didn't expect it to mean "top-level". The real question is, if people >> see something like this:: >> >> def f(): >> n = 0 >> def g(i): >> global n >> n += i >> return g >> func = f() >> print func(), func() >> >> what would they expect it to do? > > Set "n" in the scope of "func", assuming func is top-level. That global > is already a lie isn't a feature. > > I'd rather see "outer" than "global" but even that can be understood to > mean "outermost" rather than "the next one out". > > jan > > PS. If you're hunting for keywords to overload to drag variables into scope, > "import" is also available, although would probably be very hard to make > work.
How should that possibly work? Georg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com