Colon and underscores
ChuckEsterbrook at yahoo.com
ChuckEsterbrook at yahoo.com
Mon Jul 30 18:44:48 EDT 2001
On Sat, 28 Jul 2001 12:24:21 -0700, Paul Prescod
<paulp at ActiveState.com> wrote:
>Igor wrote:
>> Why__ do __Python__ programs __need to __look__ like __swarms__ of
>> __underscores ? Is it OK that one must dig in underscores instead of
>> having a normal English word for private symbols, for example?
>
>You are not supposed to invoke these methods directly. The __ makes that
>clear.
How do I get the name of a class of an object? obj.class.name doesn't
work. Neither does name(class(obj))
obj.__class__.__name__ is the only way I know how.
I don't think octuple underscores and CP4E are compatible.
-Chuck
More information about the Python-list
mailing list