static methods
Courageous
jkraska1 at san.rr.com
Sat Mar 24 00:15:07 EST 2001
>Without debating the rationale, the standard answer is to stick the
>class into a module with the same name and use module global functions
>to simulate static methods.
Yeah, it takes the uninitiated Python programmer a moment of pause
to realize that "global" variables and functions are okay in Python.
This is because every Python file is a "namespace", default. You
have automatic packaging, for free.
Python's packaging model succeeds at being elegant, easy to use,
syntactically lightweight, and conceptually the right thing.
C//
More information about the Python-list
mailing list