[Python-ideas] caching properties

George Sakkis george.sakkis at gmail.com
Thu Apr 30 03:21:56 CEST 2009


On Wed, Apr 29, 2009 at 8:31 PM, Chris Rebert <pyideas at rebertia.com> wrote:

> On Wed, Apr 29, 2009 at 4:23 PM, Benjamin Peterson <benjamin at python.org> wrote:
>> Mathias Panzenböck <grosser.meister.morti at ...> writes:
>>>
>>> You mean like the once methods in eiffel?
>>
>> I'm not sure. I've never used Eiffel.
>
> http://en.wikipedia.org/wiki/Eiffel_(programming_language)#Once_routines
>
> Sounds pretty much like what you're suggesting.

Properties are not plain methods though, they also support setters and
deleters. Should the cache be cleared after a set/delete ? Or does
cache=True implies fset=fdel=None ?

George



More information about the Python-ideas mailing list