On Thu, 2 Nov 2006, Fredrik Lundh wrote: > Talin wrote: > > > If you change the behavior of 'global' to be the same as 'nonlocal' as > > has been proposed, then this effectively becomes impossible - you can no > > longer set any global that hasn't already been pre-declared. > > of course you can, as long as it isn't shadowed in an intermediate scope.
I think the reason you wouldn't be able to create new globals is that Guido wants this to be an error (for good reasons IMHO): http://mail.python.org/pipermail/python-dev/2006-July/066968.html | Perhaps the best solution would be to make it an error if there | wasn't a visible variable named a in an outer scope. -- ?!ng _______________________________________________ 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