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/2003-November/040413.html below:

[Python-Dev] string-valued fget/fset/fdel for properties

[Python-Dev] string-valued fget/fset/fdel for properties [Python-Dev] string-valued fget/fset/fdel for propertiesGreg Ewing greg at cosc.canterbury.ac.nz
Mon Nov 24 00:28:07 EST 2003
Guido:

> I'm curious about the use case that makes you feel the need for speed.
> I would expect most properties not to simply redirect to another
> attribute, but to add at least *some* checking or other calculation.

I suspect he's thinking of cases where you only want to wrap special
behaviour around *some* of the accessors, e.g. you want writing to a
property to be mediated by a function, but reading it can just be a
normal attribute access. Currently, you're forced to pay the price of
a function call for both reading and writing in this case.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

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