class declaration shortcut
Michele Simionato
michele.simionato at gmail.com
Thu Mar 1 04:23:39 EST 2007
On Mar 1, 9:40 am, Marc 'BlackJack' Rintsch <bj_... at gmx.net> wrote:
> In <54msaoF21c6h... at mid.individual.net>, Bjoern Schliessmann wrote:
>
> > But what's it (__name__) good for?
>
> As objects don't know to which name they are bound, that's a good way to
> give some information in stack traces or when doing introspection.
Also, the name is used by pickle to find the class of pickled
instances.
Michele Simionato
More information about the Python-list
mailing list