[Python-ideas] caching properties

Arnaud Delobelle arnodel at googlemail.com
Fri May 1 16:49:12 CEST 2009


2009/4/30 Antoine Pitrou <solipsis at pitrou.net>:
> spir <denis.spir at ...> writes:
>>
>> now I wonder whether it's really worth it. Because usually it's a very simple
>> thing to implement -- often two obvious lines of code -- and easy to
> understand, even for someone who does
>> not know the principle yet.
>
> Well, for one, a generic implementation may have to be thread-safe.
> Also, while it's easy to implement, it's the kind of useful primitive - like
> enumerate() and others - which is nice to have builtin in the language or the
> standard library.

Except that the implementation of enumerate() is not in debate (nor
its interface).  For caching it will probably be a different story.

-- 
Arnaud



More information about the Python-ideas mailing list