subclass constructor problem

bruno.desthuilliers at bruno.desthuilliers at
Wed Oct 6 09:44:50 CEST 2010

On 5 oct, 17:52, de... at (Diez B. Roggisch) wrote:
> Btw, you are a bit on the overprotective side. The convention for
> marking attributes (methods or objects alike) "private"


I find that thinking in terms of "interface / implementation" instead
of "public / private" really helps focusing on what's important here.

> is by prefixing
> them with a *single* underscore.

And FWIW, the usual idiom is to avoid dummy accessor and use plain
attributes until you have a need for a computed one - in which case
you use a descriptor (either the builtin 'property' or custom
descriptor). Python is not Java.

More information about the Python-list mailing list