[Python-Dev] Exceptions *must*? be old-style classes?

Michael Hudson mwh at python.net
Mon Jan 17 15:06:39 CET 2005


Guido van Rossum <gvanrossum at gmail.com> writes:

> To be honest, I don't recall the exact reasons why this wasn't fixed
> in 2.2; I believe it has something to do with the problem of
> distinguishing between string and class exception, and between the
> various forms of raise statements.

A few months back I hacked an attempt to make all exceptions
new-style.  It's not especially hard, but it's tedious.  There's lots
of code (more than I expected, anyway) to change and my attempt ended
up being pretty messy.  I suspect allowing both old- and new-style
classes would be no harder, but even more tedious and messy.

It would still be worth doing, IMHO.

Cheers,
mwh

-- 
 <cube> If you are anal, and you love to be right all the time, C++
   gives you a multitude of mostly untimportant details to fret about
   so you can feel good about yourself for getting them "right", 
   while missing the big picture entirely       -- from Twisted.Quotes


More information about the Python-Dev mailing list