On Fri, Oct 31, 2014 at 7:06 PM, Steven D'Aprano
<steve+comp.lang.pyt...@pearwood.info> wrote:
> And there are times when using getters and setters is the right choice.
> Properties should only be used for quite lightweight calculations, because
> attribute access is supposed to be fast. If your calculation is complex,
> time-consuming or might fail, using a property is a bad idea and you should
> use an explicit getter method, possibly with a setter if needed.

I agree except that in this scenario you should probably use a verb
other than "get", since getters should also be fast.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to