Carlos wrote: > Hi! > > class A: > X = 2 > def F(): > print A.X > F() > > The above fails because the name A is not > yet at global scope when the reference A.X > is reached. Is there any way to refer to A.X > without making explicit use of the name 'A'?
How about this: >>> class A: ... X = 2 ... print X ... 2 -- Benji York -- http://mail.python.org/mailman/listinfo/python-list