Not possible to hide local variables

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Apr 30 06:05:15 CEST 2015


On Wednesday 29 April 2015 16:32, Cecil Westerhof wrote:

>> The convention is, if the caller messes with your private attributes
>> or variables, and their code breaks, they have nobody to blame but
>> themselves, and we are allowed to laugh at them. We're consenting
>> adults here.
> 
> Coming from C/C++ and Java I have to get used to it, but I will manage
> I think.


If you have a Java background, you might find this useful:

http://dirtsimple.org/2004/12/python-is-not-java.html

http://dirtsimple.org/2004/12/java-is-not-python-either.html


-- 
Steven




More information about the Python-list mailing list