subclass constructor problem
bruno.desthuilliers at gmail.com
bruno.desthuilliers at gmail.com
Wed Oct 6 03:44:50 EDT 2010
On 5 oct, 17:52, de... at web.de (Diez B. Roggisch) wrote:
> Btw, you are a bit on the overprotective side. The convention for
> marking attributes (methods or objects alike) "private"
s/private/implementation/
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