Python exception redesign proposal

Posted: April 7th, 2011 | Author: Mars | Filed under: Reference | Comments Off

PEP 3151 takes a look at the organization of exception classes in the Python library and suggests a new, more useful arrangement.

While Radian has an exception mechanism, I have thought very little about an organization of exception objects yet. Radian doesn’t really have a class hierarchy, so it’s not clear how I would replicate the Python approach, much less a system like Java. It seems like exception values ought to have a type identifier as well as some data chunk; perhaps I’ll define an “exception” object with those two fields, then use a set of well-known symbols for the type identifiers.


Comments are closed.