__doc__ immutable for classes (was: Re: how to inherit docstrings?)
Gregory Ewing
greg.ewing at canterbury.ac.nz
Fri Jun 10 03:31:17 EDT 2011
Eric Snow wrote:
> But for "method" objects (really a wrapper for
> bound functions) would it change the __doc__ of the wrapper or of the
> bound function?
You probably wouldn't want to change the __doc__ of a method
wrapper; instead you'd make sure you got hold of the underlying
function first. So __doc__ on method wrappers should probably
remain read-only to avoid surprises.
--
Greg
More information about the Python-list
mailing list