This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gsakkis
Recipients gsakkis
Date 2009-05-09.21:05:01
SpamBayes Score 8.8583845e-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