[Python-Dev] Definining properties - a use case for class decorators?

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Oct 18 04:15:43 CEST 2005


Barry Warsaw wrote:

> Ick, for all the reasons that strings are less appealing than names. 
> IMO, there's not enough advantage in having the property() call before
> the functions than after.

That's not the only benefit - you also get overridability
of the accessor methods.

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


More information about the Python-Dev mailing list