On Thu, 12 Jul 2007 10:33:03 -0000, loial <[EMAIL PROTECTED]> wrote:
>I'ma a newbie python user and would like clarification on variable
>naming conventions.
>
>What is the difference between
>
>self.myvariable

This is the convention for public attributes.

>self._myvariable

This is the convention for private attributes.

>self.__myvariable

This causes the name to be mangled in an inconvenient way by the runtime.  You
probably /don't/ want to name your variables like this, since the consequence
is primarily that the result is harder to use.

Jean-Paul
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to