[issue21561] help() on enum34 enumeration class creates only a dummy documentation
Ethan Furman
report at bugs.python.org
Mon Jun 2 18:05:07 CEST 2014
Ethan Furman added the comment:
I think something like the following, taken from http://bugs.python.org/issue19030#msg199920, shoud do the trick for something to test against:
class Meta(type):
def __getattr__(self, name):
if name == 'ham':
return 'spam'
return super().__getattr__(name)
class VA(metaclass=Meta):
@types.DynamicClassAttribute
def ham(self):
return 'eggs'
which should result in:
VA_instance = VA()
VA_instance.ham # should be 'eggs'
VA.ham # should be 'spam'
Combining all that with the DynamicClassAttribute should make a fitting test. Thanks, Andreas, for working on that.
----------
assignee: -> ethan.furman
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21561>
_______________________________________
More information about the Python-bugs-list
mailing list