module not callable - why not?
Michael Hudson
mwh at python.net
Tue Apr 20 08:42:44 EDT 2004
Paul Rubin <http://phr.cx@NOSPAM.invalid> writes:
> And yet, you can call a class instance if it has a __call__
> operation defined. I don't see why modules shouldn't be the same.
Well, for a possible counter argument, consider that you can only call
an instance of a new-style class if the CLASS defines the __call__
method...
Cheers,
mwh
--
Premature optimization is the root of all evil.
-- Donald E. Knuth, Structured Programming with goto Statements
More information about the Python-list
mailing list