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


Groups > comp.lang.python > #89597

Re: Not possible to hide local variables

Date 2015-04-29 21:10 -0600
From Michael Torrie <torriem@gmail.com>
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>
Newsgroups comp.lang.python
Message-ID <mailman.112.1430363415.3680.python-list@python.org> (permalink)

Show all headers | 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