Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'conventions': 0.07; 'everyone!': 0.07; 'prefix': 0.09; 'subject:hide': 0.09; 'variables.': 0.09; 'python': 0.11; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'subject:Not': 0.16; 'subject:possible': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'working.': 0.19; 'header:User-Agent:1': 0.23; 'own.': 0.24; 'posts': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'work.': 0.31; 'easier': 0.31; '(maybe': 0.31; 'quite': 0.32; 'something': 0.35; 'done.': 0.35; 'but': 0.35; 'there': 0.35; 'done,': 0.36; 'clear': 0.37; 'message- id:@gmail.com': 0.38; 'convention': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'helps': 0.61; 'charset:windows-1252': 0.65; 'life': 0.66 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Wed, 29 Apr 2015 21:10:02 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Not possible to hide local variables References: <874mo0zoz2.fsf@Equus.decebal.nl> <87pp6nxxwe.fsf@Equus.decebal.nl> In-Reply-To: <87pp6nxxwe.fsf@Equus.decebal.nl> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1430363415 news.xs4all.nl 2932 [2001:888:2000:d::a6]:34530 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:89597 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.