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?)

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
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 Fri, 10 Jun 2011 19:31:17 +1200
Lines 12
Message-ID <95dvi9Fq9nU1@mid.individual.net> (permalink)
References <mailman.65.1307662177.11593.python-list@python.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net lMLUH6aJX8UvFIwxDLEmaQ417630ZxQntG7gJuyAPdyHngVEVq
Cancel-Lock sha1:UTZaCVqlxVJAlyYaA1YYJRMf6z0=
User-Agent Mozilla Thunderbird 1.0.5 (Macintosh/20050711)
X-Accept-Language en-us, en
In-Reply-To <mailman.65.1307662177.11593.python-list@python.org>
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:7362

Show key headers only | 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