[IronPython] New-style exceptions in Python 2.5

Dino Viehland dinov at exchange.microsoft.com
Fri Oct 27 18:11:25 CEST 2006


There's also several other Python 2.5 features we don't yet support.  We're hoping to get to these for 1.1.

For new-style exceptions we'll update the ExceptionConverter to use new-style classes instead of old-style classes.  The hope is that the rest of the runtime then basically picks this change up for free because it's abstracted away from it.  If that works as planned then the -X:Python25 feature could switch the exception modes as well as the other 2.5 features.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Friday, October 27, 2006 5:25 AM
To: Discussion of IronPython
Subject: [IronPython] New-style exceptions in Python 2.5

Exceptions became new-style in Python 2.5. How will this be handled?
Given test.py below,

$ python2.4 test.py
True
False
$ python2.5 test.py
False
True

While,

$ ipy test.py
True
False
$ ipy -X:Python25 test.py
True
False

# test.py
class error(Exception):
    pass

import types
et = type(error)
print et is types.ClassType
print et is types.TypeType

--
Seo Sanghyeon
_______________________________________________
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