On Sat, Mar 30, 2013 at 8:12 AM, Sam Berry <sambez...@hotmail.co.uk> wrote:
> class test()
>     s = 1
>
>     def test1()
>         global s
>         s = 2
>
>     def test2()
>         global s
>         s = 3
>
>     def test3()
>         global s
>         s = 4

That's not a global, that's a class variable. But to give any more
specific help, it'd be helpful to have some actual working code -
twiddle your code until it's a nice simple example:

http://sscce.org/

Most likely, what you want is to make these functions into either
static methods or instance methods. Beyond that, hard to say exactly.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to