[Python-ideas] caching properties

Benjamin Peterson benjamin at python.org
Thu Apr 30 00:33:27 CEST 2009


I think it would be nice to add a "cache" argument to the property()
constructor. When "cache" was True, property would only ask the getter function
once for the result. This would simplify properties that require expensive
operations to compute.




More information about the Python-ideas mailing list