global and None

Martin v. Loewis martin at v.loewis.de
Tue Dec 23 04:47:30 EST 2003


Leo Yee wrote:
> Does anyone know what I should do to solve this problem? Thanks in advance.

The global declaration must go in each function that uses the global
variable, and not in the global namespace defining the variable (in
the global namespace, it is clear that the variable is global, so
no need to declare that).

Regards,
Martin





More information about the Python-list mailing list