[New-bugs-announce] [issue5982] classmethod, staticmethod: expose wrapped function
George Sakkis
report at bugs.python.org
Sat May 9 23:05:03 CEST 2009
New submission from George Sakkis <george.sakkis at gmail.com>:
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
----------
messages: 87511
nosy: gsakkis
severity: normal
status: open
title: classmethod, staticmethod: expose wrapped function
type: feature request
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5982>
_______________________________________
More information about the New-bugs-announce
mailing list