Beginners question

Ronn Ross ronn.ross at
Sat Jul 18 03:42:43 CEST 2009

How do you define a global variable in a class. I tried this with do
class ClassName:
    global_var = 1

    def some_methos():
        print global_var

This doesn't work. What am I doing wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list