[IronPython] __dict__ of exception instances

Dino Viehland dinov at exchange.microsoft.com
Wed Mar 12 01:08:26 CET 2008


Interestingly it happens for any exception class with any property:

>>> BaseException().abc
<OperationFailed object at 0x000000000000002C>

This is somehow related to the new-style exception support for 2.5 compatibility.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dave Fugate
Sent: Tuesday, March 11, 2008 3:24 PM
To: Discussion of IronPython
Subject: Re: [IronPython] __dict__ of exception instances

Strange...  Filed as http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=15571 and thanks for reporting this!

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
Sent: Tuesday, March 11, 2008 3:16 PM
To: Discussion of IronPython
Subject: [IronPython] __dict__ of exception instances

Hello guys,

Attempting to access the '__dict__' attribute of a SyntaxError exception
in IP2a8 *returns* an 'OperationFailed' object.

The codeop module (Python standard library) compiles source code and
*compares* the __dict__ attribute of SyntaxError exception instances...

(I can work around this bug for the interactive interpreter...)

Michael Foord
http://www.manning.com/foord


_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list