Looks like this is because type.__module__ is not a data descriptor.

I believe I have a fix.

-----Original Message-----
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Seo Sanghyeon
Sent: Wednesday, June 17, 2009 3:04 AM
To: Discussion of IronPython
Subject: [IronPython] __module__ of FunctionType

Following program prints different result between CPython and IronPython:

def f(): pass
print type(f).__module__

CPython: __builtin__
IronPython: <property# __module__ on function>

This breaks codes which assume __module__ is a string.

--
Seo Sanghyeon
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to