[Python-Dev] RFC: readproperty

Phillip J. Eby pje at telecommunity.com
Thu Sep 29 03:53:19 CEST 2005


At 01:34 PM 9/29/2005 +1200, Greg Ewing wrote:
>Guido van Rossum wrote:
> > I think we need to be real careful with chosing a name
>
>In Eiffel, the keyword "once" is used for something
>analogous -- a method that is called once the first
>time it's referenced, and the return value cached.
>
>So perhaps this could be called a "once_property".

I was actually going to propose that before I thought of defaultproperty, 
and in fact my equivalent descriptor was originally called "Once", but the 
truth is that it gets called every time you delete it and reuse it, whereas 
Eiffel's once functions are called once, period, with no way to reset 
them.  (At least, IIRC.)



More information about the Python-Dev mailing list