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


Groups > comp.lang.python > #56385

Re: class-private names and the Zen of Python

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail
From Marco Buttu <marco.buttu@gmail.com>
Newsgroups comp.lang.python
Subject Re: class-private names and the Zen of Python
Date Tue, 08 Oct 2013 12:47:17 +0200
Organization Aioe.org NNTP Server
Lines 23
Message-ID <5253E2B5.4060905@gmail.com> (permalink)
References <l30lsq$tfd$1@speranza.aioe.org> <mailman.848.1381228611.18130.python-list@python.org>
NNTP-Posting-Host yLEXU8HhfLiiXyuXjVRTFQ.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.python:56385

Show key headers only | View raw


On 10/08/2013 12:36 PM, Terry Reedy wrote:

> On 10/8/2013 6:13 AM, Marco Buttu wrote:
>> In the following case:
>>
>>  >>> class Foo:
>> ...     _Foo__a = 100
>> ...     __a = 33
>> ...
>>  >>> Foo._Foo__a
>> 33
>>
>> I think this behavior, for a user who does not know the convention,
>> could be a surprise.
>
> No one qualified to use such names would do such a thing , so there is
> no need to worry about it or do anything about it.

Is this transformation performed by the parser, before to call the 
metaclass?

-- 
Marco Buttu

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


Thread

class-private names and the Zen of Python Marco Buttu <marco.buttu@gmail.com> - 2013-10-08 12:13 +0200
  Re: class-private names and the Zen of Python Terry Reedy <tjreedy@udel.edu> - 2013-10-08 06:36 -0400
    Re: class-private names and the Zen of Python Marco Buttu <marco.buttu@gmail.com> - 2013-10-08 12:47 +0200
  Re: class-private names and the Zen of Python Ned Batchelder <ned@nedbatchelder.com> - 2013-10-08 07:07 -0400
    Re: class-private names and the Zen of Python Marco Buttu <marco.buttu@gmail.com> - 2013-10-08 13:15 +0200
      Re: class-private names and the Zen of Python Ned Batchelder <ned@nedbatchelder.com> - 2013-10-08 12:20 -0400
  Re: class-private names and the Zen of Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-08 13:24 +0000
    Re: class-private names and the Zen of Python Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-10-09 00:00 +0100
      Re: class-private names and the Zen of Python Marco Buttu <marco.buttu@gmail.com> - 2013-10-09 07:55 +0200
    Re: class-private names and the Zen of Python Charles Hixson <charleshixsn@earthlink.net> - 2013-10-09 12:34 -0700

csiph-web