strings in the global section

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Thu Oct 12 15:25:09 EDT 2006


Phoe6 wrote:

> #!/usr/bin/python
> global astring
> astring = "This is a String"

A global declaration just says "look for this name in the module
namespace". Since you /are/ in the module namespace here, there's
no need to put "global" here.
 
> Works, but something different ?

Excuse me, what do you mean?

Regards,


Björn

-- 
BOFH excuse #410:

Electrical conduits in machine room are melting.




More information about the Python-list mailing list