On Nov 3, 2007, at 5:32 PM, Pawel wrote: > Stargaming wrote: >> You can make this work using the `global` statement:: >> >>>>> def foo(): >> ... global x >> ... print x >> ... x = 0 > > Is there any way to disable global for x? Something like that: >>>> x = 12345 >>>> def foo(): > ... global x > ... print x > ... noglobal(x) # ??? > ... x = 0 # now this is local x >>>> foo() > 12345 >>>> print x > 12345
Why would you need to do that? It would be confusing. Just use a different variable name for the local. Erik Jones Software Developer | Emma® [EMAIL PROTECTED] 800.595.4401 or 615.292.5888 615.292.0777 (fax) Emma helps organizations everywhere communicate & market in style. Visit us online at http://www.myemma.com -- http://mail.python.org/mailman/listinfo/python-list