[Python-Dev] Writable __doc__

Guido van Rossum guido at python.org
Thu Jan 19 18:21:56 CET 2012

On Thu, Jan 19, 2012 at 8:36 AM, Ethan Furman <ethan at stoneleaf.us> wrote:

> Benjamin Peterson wrote:
>> 2012/1/19 Victor Stinner <victor.stinner at haypocalc.com>**:
>>> http://bugs.python.org/**issue12773 <http://bugs.python.org/issue12773> :)
>>> The bug is marked as close, whereas the bug exists in Python 3.2 and
>>> has no been closed. The fix must be backported.
>> It's not a bug; it's a feature.
> Where does one draw the line between feature and bug?  As a user I'm
> inclined to classify this as a bug:  __doc__ was writable with old-style
> classes; __doc__ is writable with new-style classes with any metaclass; and
> there exists no good reason (that I'm aware of ;) for __doc__ to not be
> writable.

Like it or not, this has worked this way ever since new-style classes were
introduced. That has made it a de-facto feature. We should not encourage
people to write code that works with a certain bugfix release but not with
the previous bugfix release of the same feature release.

Given that we haven't had any complaints about this in nearly a decade, the
backport can't be important. Don't do it.

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120119/ce16357f/attachment-0001.html>

More information about the Python-Dev mailing list