Not possible to hide local variables

Michael Torrie torriem at gmail.com
Wed Apr 29 23:10:02 EDT 2015


On 04/29/2015 12:16 AM, Cecil Westerhof wrote:
>> Prefix those names with a single leading underscore, which is the
>> convention for private variables.
> 
> Done.
> 
>> This way, if some user (maybe you! ;) has a good reason to change
>> those values in can be done, but it is quite clear that said user is
>> mucking about with internals and they are on their own.
> 
> There is something to say for this way of working.

I must say your posts are refreshing.  It's good to see someone come
into Python and learn the conventions of Python and roll with it instead
of trying to insist on Java- or C++-isms and idioms.
Makes life so much better and easier for everyone!  And helps make
Python enjoyable for you as well. Keep up the good work.




More information about the Python-list mailing list