2007-01-24 22:24:01 +08:00
|
|
|
try:
|
|
|
|
BaseException = BaseException
|
|
|
|
except NameError:
|
|
|
|
BaseException = Exception
|
2007-09-20 23:17:22 +08:00
|
|
|
|
|
|
|
try:
|
|
|
|
GeneratorExit = GeneratorExit
|
|
|
|
except NameError:
|
|
|
|
class GeneratorExit(Exception):
|
|
|
|
""" This exception is never raised, it is there to make it possible to
|
|
|
|
write code compatible with CPython 2.5 even in lower CPython
|
|
|
|
versions."""
|
|
|
|
pass
|
2008-01-25 20:46:31 +08:00
|
|
|
GeneratorExit.__module__ = 'exceptions'
|