[issue5867] No way to create an abstract classmethod
Daniel Urban
report at bugs.python.org
Fri Aug 13 21:35:15 CEST 2010
Daniel Urban <urban.dani+py at gmail.com> added the comment:
Here is a patch, which adds a descriptor to classmethod and staticmethod.
Pseudocode:
__get__(self, inst, owner):
if getattr(inst.callable, '__isabstractmethod__', False):
return True
return False
__set__(self, inst, value):
inst.callable.__isabstractmethod__ = bool(value)
----------
keywords: +patch
Added file: http://bugs.python.org/file18510/issue5867.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5867>
_______________________________________
More information about the Python-bugs-list
mailing list