[IronPython] Empty Module Contents
Michael Foord
michael.foord at resolversystems.com
Thu Jun 22 04:33:11 PDT 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 :
CPython
>>> import empty_module
>>> vars(empty_module).keys()
['__builtins__', '__name__', '__file__', '__doc__']
>>>
IronPython
>>> import empty_module
>>> vars(empty_module).keys()
['__doc__', '__name__', None, '__builtins__', '__file__', '__str__',
'__repr__',
'__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
http://www.resolversystems.com
http://www.voidspace.org.uk/python/index.shtml
More information about the users
mailing list