module not callable - why not?

Jeff Epler jepler at unpythonic.net
Sun Apr 18 10:03:52 EDT 2004


On Sun, Apr 18, 2004 at 09:08:37AM -0400, Heather Coppersmith wrote:
> Note that modules are neither functions nor objects.

Of course modules are objects.  Everything is an object, and most things
are even instances of "object".

>>> import sys
>>> type(sys)
<type 'module'>
>>> isinstance(sys, object)
1

Jeff




More information about the Python-list mailing list