A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-October/075065.html below:

[Python-Dev] Declaring setters with getters

[Python-Dev] Declaring setters with getters [Python-Dev] Declaring setters with gettersGuido van Rossum guido at python.org
Wed Oct 31 19:14:03 CET 2007
On 10/31/07, Raymond Hettinger <python at rcn.com> wrote:
> > I'd like to make this [propset] a standard built-in,
>
> +1 -- I find this to be an attractive syntax
>
> > I'd also like to change property so that the doc
> > string defaults to the doc string of the getter.
>
> +1 -- This should also be done for classmethod,
> staticmethod, and anything else that wraps functions.

With this level of support, it could be implemented by this afternoon!
(and backported to 2.4 within a week. ;-)

> Alternatively, the doc string could be made a little
> more informative:
>
> __doc__ = 'property of function %s: %s' % (f.__name__, f.__doc__)

Hm, not clear that helps. It's not a property of the function. We
should just teach users to write docstrings that read well for this
use case.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4