[IronPython] Empty Module Contents

Michael Foord michael.foord at resolversystems.com
Thu Jun 22 13:33:11 CEST 2006

Hello all,

There is a difference between the contents of an empty module (or any 
other module for that matter) in CPython and IronPython. This is 
possibly an implementation detail, but it causes PyChecker to crash so I 
thought I'd report it. (Tested in Beta 8.)

Create an empty file called 'empty_module.py' then import it and run the 
following :


 >>> import empty_module
 >>> vars(empty_module).keys()
['__builtins__', '__name__', '__file__', '__doc__']


 >>> import empty_module
 >>> vars(empty_module).keys()
['__doc__', '__name__', None, '__builtins__', '__file__', '__str__', 
 '__new__', '__init__', '__module__']

It is (so far) specifically the presence of None that is problematic for 
me, so I'm building workarounds.

All the best,

Michael Foord

More information about the Ironpython-users mailing list