Re: Access class from staticmethod

2010-04-30 Thread Thomas Allen
Ah ha, @classmethod. On Apr 30, 3:47 pm, Thomas Allen wrote: > Is that possible? > > class A(object): >   @staticmethod >   def set_b(x): >     # A.b = x, without knowing A is "A" >     pass > > Thomas -- http://mail.python.org/mailman/listinfo/python-list

Access class from staticmethod

2010-04-30 Thread Thomas Allen
Is that possible? class A(object): @staticmethod def set_b(x): # A.b = x, without knowing A is "A" pass Thomas -- http://mail.python.org/mailman/listinfo/python-list