[IronPython] Empty Module Contents

Dino Viehland dinov at exchange.microsoft.com
Thu Jun 22 17:41:54 CEST 2006

I've filed this as CodePlex bug #561 - hopefully we can get this fixed for the next release.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
Sent: Thursday, June 22, 2006 4:33 AM
To: Discussion of IronPython
Subject: [IronPython] Empty Module Contents

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__', '__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
users mailing list
users at lists.ironpython.com

More information about the Ironpython-users mailing list