Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Marco Buttu Newsgroups: comp.lang.python Subject: Re: class-private names and the Zen of Python Date: Tue, 08 Oct 2013 13:15:17 +0200 Organization: Aioe.org NNTP Server Lines: 31 Message-ID: <5253E945.5030608@gmail.com> References: NNTP-Posting-Host: yLEXU8HhfLiiXyuXjVRTFQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; 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:56388 On 10/08/2013 01:07 PM, Ned Batchelder wrote: > On 10/8/13 6:13 AM, Marco Buttu wrote: >> >> >>> class Foo: >> ... _Foo__a = 100 >> ... __a = 33 >> ... >> >>> Foo._Foo__a >> 33 >> ... > You also get a "problem" if you do this: > > >>> class Foo: > ... a = 100 > ... a = 33 > ... > >>> Foo.a > 33 But this does not happen under the hood, it is explicit > Also, as Terry mentions, no one has ever assigned the two names you > show, Sincerely, I can not now if someone has assigned (or will assegne) in such way... -- Marco Buttu