Message87511
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 |
|
Date |
User |
Action |
Args |
2009-05-09 21:05:03 | gsakkis | set | recipients:
+ gsakkis |
2009-05-09 21:05:03 | gsakkis | set | messageid: <1241903103.58.0.38956766589.issue5982@psf.upfronthosting.co.za> |
2009-05-09 21:05:02 | gsakkis | link | issue5982 messages |
2009-05-09 21:05:01 | gsakkis | create | |
|