Message240348
Issue #15582 added docstring inheritance to the inspect module. This means that Enum subclasses without their own docstring now inherit the generic docstring from the base class definition:
>>> import enum, inspect
>>> class MyEnum(enum.Enum):
... a = 1
...
>>> inspect.getdoc(MyEnum)
'Generic enumeration.\n\nDerive from this class to define new enumerations.'
Perhaps the metaclass could automatically derive a more suitable docstring if the subclass doesn't set one of its own? |
|
Date |
User |
Action |
Args |
2015-04-09 16:42:37 | ncoghlan | set | recipients:
+ ncoghlan, barry, eli.bendersky, ethan.furman, serhiy.storchaka |
2015-04-09 16:42:37 | ncoghlan | set | messageid: <1428597757.76.0.767487050149.issue23900@psf.upfronthosting.co.za> |
2015-04-09 16:42:37 | ncoghlan | link | issue23900 messages |
2015-04-09 16:42:37 | ncoghlan | create | |
|