embarrassing class question

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Sat Oct 30 05:57:57 EDT 2010


On Sat, 30 Oct 2010 19:30:21 +1300, Gregory Ewing wrote:

> (BTW, there are no function names that have a special meaning in a
> module dict -- a module is not like a class.)

Pity... it would be nice to have a __main__() function, or perhaps 
main(), that was automatically called when you call the module like a 
script.

There are, however, a few special module attributes -- they just aren't 
functions. __doc__, __name__, __file__ and __package__ come to mind.


-- 
Steven



More information about the Python-list mailing list