On 2007-07-12, Ben Finney <[EMAIL PROTECTED]> wrote:
>> self.__myvariable
>
> Indicates to the reader that the attribute '__myvariable' is
> not available by that name outside the object, and name
> mangling is automatically done to discourage its use from
> outside the object.
>From _Python Refer
loial <[EMAIL PROTECTED]> writes:
> What is the difference between
>
> self.myvariable
Indicates to the reader that the attribute 'myvariable' is available
for use as part of the interface of the object.
Prefer this style unless you have good reason in a particular case to
do otherwise.
> self.
On Thu, 12 Jul 2007 10:33:03 -, 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 conventio
I'ma a newbie python user and would like clarification on variable
naming conventions.
What is the difference between
self.myvariable
self._myvariable
self.__myvariable
and when should I use each of them?
--
http://mail.python.org/mailman/listinfo/python-list