Why less emphasis on private data?

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sun Jan 7 12:56:46 EST 2007


Paul Rubin a écrit :
> "Felipe Almeida Lessa" <felipe.lessa at gmail.com> writes:
> 
>>What is the chance of having to inherit from two classes from
>>different modules but with exactly the same name *and* the same
>>instance variable name?
>>
>>Of course you're being very pessimistic or extremely unlucky.
> 
> 
> If you want to write bug-free code, pessimism is the name of the game.

Not to pretend my own code is always totally bug-free, but I found that, 
with languages like Python, I usually got better results starting with 
the simplest possible implementation, and only then adding some 
'defensive' boilerplate where it makes sens (that is mostly resources 
acquisition/release) - an approach that I would certainly not advocate 
when it comes to coding in C...



More information about the Python-list mailing list