SyntaxWarning: name 'mailcounter' is used prior to global declaration

Felix Seeger seeger at
Wed Jun 12 11:39:57 CEST 2002

Ahh, I have it.
global was used after a mailcounter was used.

Felix Seeger wrote:

> Hi
> I get this warning.
> I set mailcounter as a global var because I have to change it's value from
> a method in a class.
> This was the only way. How can I remove this warning ?
> Mailcounter is defined at the beginning of the script and "global
> mailcounter" is called in the method.
> thanks
> have fun
> Felix

More information about the Python-list mailing list