imported method from module evaluates to None in some cases

Hrvoje Niksic hniksic at
Thu Nov 20 14:53:08 CET 2008

Andrew <andrewpadilla1 at> writes:

> I'm having a problem in some zope (2.10) code ( where
> a method that gets imported somehow evaluates to None in certain cases
> which causes a TypeError exception to be raised (eg: TypeError:
> 'NoneType' object is not callable). The code excerpt is below where
> the exception is raised on the line with the comment 'TypeError IS

Could the "certain cases" involve automatic invocation of the close
method at interpreter shutdown?  While the interpreter shuts down,
module-level variables are set to None.  This is documented in some
detail in, steps C1-C3.

More information about the Python-list mailing list