On 2 September 2013 06:33, Ethan Furman <et...@stoneleaf.us> wrote:

>
> class PlainPython:
>
>     value = None
>
>
> In the Javaesque class we see the unPythonic way of using getters/setters;
> in the ProtectedPython* class we see the pythonic way of providing
> getters/setters**; in the PlainPython class we have the standard,
> unprotected, direct access to the class attribute.
>
> No where in PlainPython is a getter/setter defined, nor does Python define
> one for us behind our backs.
>
> If you have evidence to the contrary I'd like to see it.
>

I think Roy is referring to the fact that attribute access is implemented
via __getattr__ / __getattribute__ / __setattr__ / __delattr__. From one
point of view, he's absolutely correct - nearly all attributes are accessed
via getters/setters in Python.

Tim Delaney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to