Eric Brunel a écrit :
> On Sun, 25 Feb 2007 22:12:52 +0100, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>
>> Steven W. Orr a écrit :
>>
>>> I understand that two leading underscores in a class attribute make
>>> the attribute private.
>>
>>
>> Nope. It doesn't make it "private", it mangle
On Sun, 25 Feb 2007 22:12:52 +0100, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Steven W. Orr a écrit :
>> I understand that two leading underscores in a class attribute make the
>> attribute private.
>
> Nope. It doesn't make it "private", it mangles the attribute name with
> the class
Troy Melhase a écrit :
>> Why do people sometimes use one leading underscore?
>
>
> Many folks like to use the single leading underscore to emphasize that
> the attribute isn't part of the normal way to use the class or
> instance.
>
> It's bad style in my opinion, but I'm probably in the minori
Steven W. Orr a écrit :
> I understand that two leading underscores in a class attribute make the
> attribute private.
Nope. It doesn't make it "private", it mangles the attribute name with
the class name (ie : Bar.__mangled will become Bar._Bar__mangled
everywhere except inside Bar). This is
On Feb 23, 5:12 pm, "Steven W. Orr" <[EMAIL PROTECTED]> wrote:
> I understand that two leading underscores in a class attribute make the
> attribute private. But I often see things that are coded up with one
> underscore. Unless I'm missing something, there's a idiom going on here.
>
> Why do peopl
En Fri, 23 Feb 2007 13:12:20 -0300, Steven W. Orr <[EMAIL PROTECTED]>
escribió:
> I understand that two leading underscores in a class attribute make the
> attribute private. But I often see things that are coded up with one
> underscore. Unless I'm missing something, there's a idiom going on he
On 2/23/07, James Stroud <[EMAIL PROTECTED]> wrote:
> Troy Melhase wrote:
> >> Why do people sometimes use one leading underscore?
> >
> >
> > Many folks like to use the single leading underscore to emphasize that
> > the attribute isn't part of the normal way to use the class or
> > instance.
> >
Troy Melhase wrote:
>> Why do people sometimes use one leading underscore?
>
>
> Many folks like to use the single leading underscore to emphasize that
> the attribute isn't part of the normal way to use the class or
> instance.
>
> It's bad style in my opinion, but I'm probably in the minority.
> Why do people sometimes use one leading underscore?
Many folks like to use the single leading underscore to emphasize that
the attribute isn't part of the normal way to use the class or
instance.
It's bad style in my opinion, but I'm probably in the minority.
--
http://mail.python.org/mailman/