@property; @classmethod; def f()

K. Richard Pixley rich at noir.com
Sat Jan 1 20:55:10 EST 2011


Can anyone explain to me why this doesn't work?

class Foo(object):
     @property
     @classmethod
     def f(cls):
         return 4

I mean, I think it seems to be syntactically clear what I'm trying to 
accomplish.  What am I missing?

--rich



More information about the Python-list mailing list