strings in the global section

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at
Thu Oct 12 21:25:09 CEST 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?



BOFH excuse #410:

Electrical conduits in machine room are melting.

More information about the Python-list mailing list