Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #89597

Re: Not possible to hide local variables

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 <torriem+gmail@torriefamily.org>
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 <torriem@gmail.com>
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> <mailman.57.1430207777.3680.python-list@python.org> <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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.112.1430363415.3680.python-list@python.org> (permalink)
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

Show key headers only | View raw


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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Not possible to hide local variables Cecil Westerhof <Cecil@decebal.nl> - 2015-04-28 09:33 +0200
  Re: Not possible to hide local variables Ethan Furman <ethan@stoneleaf.us> - 2015-04-28 00:56 -0700
    Re: Not possible to hide local variables Cecil Westerhof <Cecil@decebal.nl> - 2015-04-29 08:16 +0200
      Re: Not possible to hide local variables Michael Torrie <torriem@gmail.com> - 2015-04-29 21:10 -0600
  Re: Not possible to hide local variables Chris Angelico <rosuav@gmail.com> - 2015-04-28 18:06 +1000
    Re: Not possible to hide local variables Cecil Westerhof <Cecil@decebal.nl> - 2015-04-29 08:25 +0200
      Re: Not possible to hide local variables Chris Angelico <rosuav@gmail.com> - 2015-04-29 17:36 +1000
  Re: Not possible to hide local variables Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-28 18:37 +1000
    Re: Not possible to hide local variables Chris Angelico <rosuav@gmail.com> - 2015-04-28 18:44 +1000
    Re: Not possible to hide local variables Marko Rauhamaa <marko@pacujo.net> - 2015-04-28 12:20 +0300
    Re: Not possible to hide local variables Cecil Westerhof <Cecil@decebal.nl> - 2015-04-29 08:32 +0200
      Re: Not possible to hide local variables Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-30 14:05 +1000
        Re: Not possible to hide local variables Marko Rauhamaa <marko@pacujo.net> - 2015-04-30 08:10 +0300
          Re: Not possible to hide local variables Chris Angelico <rosuav@gmail.com> - 2015-04-30 16:01 +1000
  Re: Not possible to hide local variables Cecil Westerhof <Cecil@decebal.nl> - 2015-04-29 08:14 +0200
  Re: Not possible to hide local variables Grant Edwards <invalid@invalid.invalid> - 2015-04-29 14:16 +0000
    Re: Not possible to hide local variables Dave Angel <davea@davea.name> - 2015-04-29 22:31 -0400
    Re: Not possible to hide local variables Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-04-30 08:53 -0400
      Re: Not possible to hide local variables Cecil Westerhof <Cecil@decebal.nl> - 2015-04-30 16:50 +0200

csiph-web