[Python-Dev] Major revision of PEP 348 committed

Brett Cannon bcannon at gmail.com
Sun Aug 7 06:26:28 CEST 2005

Version 1.5 of PEP 348 (http://www.python.org/peps/pep-0348.html) just
got checked in.  This one is a *big* change compared to the previous

* Renamings removed
* SystemExit are the KeyboardInterrupt are the only exceptions *not*
inheriting from Exception
    + CriticalException has been renamed TerminalException so it is
more inline with the idea that the exceptions are meant to terminate
the interpreter, not that they are more critical than other exceptions
* Removed ControlFlowException
    + StopIteration and GeneratorExit inherit from Exception directly
* Added VMError which inherits Exception
    + SystemError and MemoryError subclass VMError
* Removed UnboundG(Global|Free)Error
* other stuff I don't remember

This version addresses everyone's worries about
backwards-compatibility or changes that were not substantive enough to
break code.

The things I did on my own without thorough discussion is remove
ControlFlowException and introduce VMError.  The former seemed
reasonable since catching control flow exceptions as a group is
probably rare and with StopIteration and GeneratorExit not falling
outside of Exception, ControlFlowException lost its usefulness.

VMError was introduced to allow the grouping of MemoryError and
SystemError since they are both exceptions relating to the VM.  The
name can be changed to InterpreterError, but VMError is shorter while
still getting the idea across.  Plus I just like VMError more.  =)

OK, guys, have at it.


More information about the Python-Dev mailing list