Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #7362

Re: __doc__ immutable for classes (was: Re: how to inherit docstrings?)

From Gregory Ewing <greg.ewing@canterbury.ac.nz>
Newsgroups comp.lang.python
Subject Re: __doc__ immutable for classes (was: Re: how to inherit docstrings?)
Date 2011-06-10 19:31 +1200
Message-ID <95dvi9Fq9nU1@mid.individual.net> (permalink)
References <mailman.65.1307662177.11593.python-list@python.org>

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

__doc__ immutable for classes (was: Re: how to inherit docstrings?) Eric Snow <ericsnowcurrently@gmail.com> - 2011-06-09 17:29 -0600
  Re: __doc__ immutable for classes (was: Re: how to inherit docstrings?) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-06-10 19:31 +1200
    Re: __doc__ immutable for classes Terry Reedy <tjreedy@udel.edu> - 2011-06-10 21:17 -0400

csiph-web