Author gsakkis
Recipients gsakkis
Date 2009-05-09.21:05:01
SpamBayes Score 8.85838e-05
Marked as misclassified No
Message-id <1241903103.58.0.38956766589.issue5982@psf.upfronthosting.co.za>
In-reply-to
Content
It would be nice if classmethod/staticmethod exposed the wrapped
function as a read-only attribute/property. Currently the function can
be retrieved indirectly but it's obscure (and perhaps not always
correct, I'm not sure):

In [147]: def f():pass
   .....: 

In [148]: c = classmethod(f)

In [149]: s = staticmethod(f)

In [150]: c.__get__(1).im_func is f
Out[150]: True

In [151]: s.__get__(1) is f
Out[151]: True
History
Date User Action Args
2009-05-09 21:05:03gsakkissetrecipients: + gsakkis
2009-05-09 21:05:03gsakkissetmessageid: <1241903103.58.0.38956766589.issue5982@psf.upfronthosting.co.za>
2009-05-09 21:05:02gsakkislinkissue5982 messages
2009-05-09 21:05:01gsakkiscreate