[New-bugs-announce] [issue15731] Mechanism for inheriting docstrings and signatures
report at bugs.python.org
Mon Aug 20 06:37:32 CEST 2012
New submission from Nick Coghlan:
While working on #8810, I was reminded of the problem of wanting to inherit docstrings while replacing a method implementation.
The abstract base class method docstrings for tzinfo.utcoffset and tzinfo.dst are also correct for the concrete subclasses in the pure Python and the C versions. However, the docstrings currently need to be duplicated in all 3 places manually.
functools.wraps already plays in this space, but arguably asserts *too much* about the relationship between components
A couple of descriptors on bound and unbound methods (for __doc__ and __signature__) could have dealt with this fairly easily, but we don't have unbound methods any more :(
components: Library (Lib)
nosy: eric.snow, ncoghlan
title: Mechanism for inheriting docstrings and signatures
versions: Python 3.4
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce