Patches item #1005461, was opened at 2004-08-08 11:08
Message generated for change (Comment added) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1005461&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Modules
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: Dima Dorfman (ddorfman)
Assigned to: Nobody/Anonymous (nobody)
Summary: property to get the docstring from fget
Initial Comment:
Allow property objects to use the fget function's docstring if a
property docstring wasn't specified. This was suggested by
someone on python-dev or c.l.py, but I don't remember who it was
(sorry). Function docstrings are easier to write (read: prettier) than
explicit doc= arguments, so this should make more properties
have docstrings, sometimes automagically (I know it will for my
code, anyway). It gets even better with syntatic sugar for
decorators; read-only properties can now be defined, including
docstring, with just one function:
@property
def golden(self):
"""The Golden Ratio. (Don't ask why this is a property.)"""
return (1 + math.sqrt(5)) / 2
The doc part of the patch also improves some markup in the
vicinity.
----------------------------------------------------------------------
>Comment By: Georg Brandl (gbrandl)
Date: 2006-05-22 10:16
Message:
Logged In: YES
user_id=849994
This was addressed by patch 1434038.
----------------------------------------------------------------------
Comment By: Dima Dorfman (ddorfman)
Date: 2004-08-09 02:06
Message:
Logged In: YES
user_id=908995
Oops, now that I'm sufficiently awake, it's pretty obvious that the patch
is broken--it leaks a reference every time the new code runs. Mea culpa!
Corrected patch attached.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1005461&group_id=5470
_______________________________________________
Patches mailing list
[email protected]
http://mail.python.org/mailman/listinfo/patches