[New-bugs-announce] [issue24064] Make the property doctstring writeable

Raymond Hettinger report at bugs.python.org
Mon Apr 27 06:53:07 CEST 2015


New submission from Raymond Hettinger:

I can't see any reason for property docstrings to be readonly:

    >>> p = property(doc='basic')
    >>> p.__doc__
    'basic'
    >>> p.__doc__ = 'extended'
    Traceback (most recent call last):
      File "<pyshell#46>", line 1, in <module>
        p.__doc__ = 'extended'
    AttributeError: readonly attribute

Among other things, making it writeable would simplify the ability to update the docstrings produced by namedtuple;

    Time.mtime.__doc__ = 'modification time'
    Score.max = 'all time cumulative high score for a single season'

----------
components: Interpreter Core
keywords: easy
messages: 242098
nosy: rhettinger
priority: normal
severity: normal
stage: patch review
status: open
title: Make the property doctstring writeable
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24064>
_______________________________________


More information about the New-bugs-announce mailing list