The difference between __XX__ and XX method

James Mills prologic at shortcircuit.net.au
Mon Sep 8 17:48:35 EDT 2008


Hi,

This is convention only
and typically used to denote
that a particular class attribute
is "private". Though note,
there is really no such thing in
Python.

cheers
James

On Tue, Sep 9, 2008 at 7:31 AM, AON LAZIO <aonlazio at gmail.com> wrote:
> Hi, Pythoners.
>       I would like to know that in some class, it uses __XX__ but in some it
> uses only XX
> for example,
>
> class Test:
>     def __som__(self):
>           ...
>     def som(self):
>           ...
>    What does "__XX__" make the method different from XX?
>    Thanks in advance
> Aonlazio
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
--
-- "Problems are solved by method"



More information about the Python-list mailing list