Does Python really follow its philosophy of "Readability counts"?
bdesth.quelquechose at free.quelquepart.fr
Wed Jan 14 20:56:08 CET 2009
Paul Rubin a écrit :
> Bruno Desthuilliers <bruno.42.desthuilliers at websiteburo.invalid> writes:
>> Given that the convention for "protected" attributes in Python is to
>> prefix them with an underscore, I fail to see how one could
>> "accidentally" mess with implementation details. Typing a leading
>> underscore is rarely a typo.
> We are talking about the accidental creation of new attributes in
> places outside the initializer.
Nope. This was about encapsulation and data-hiding, cf:
and the convention James refered to was obviously the naming convention.
More information about the Python-list