[pypy-svn] r4803 - pypy/trunk/src/pypy/appspace

hpk at codespeak.net hpk at codespeak.net
Tue Jun 1 14:43:08 CEST 2004


Author: hpk
Date: Tue Jun  1 14:43:07 2004
New Revision: 4803

Modified:
   pypy/trunk/src/pypy/appspace/exceptions.py
Log:
*really* just store the builtin exceptions into exceptions ... 



Modified: pypy/trunk/src/pypy/appspace/exceptions.py
==============================================================================
--- pypy/trunk/src/pypy/appspace/exceptions.py	(original)
+++ pypy/trunk/src/pypy/appspace/exceptions.py	Tue Jun  1 14:43:07 2004
@@ -1,14 +1,43 @@
-
-
-def _genex():
-    glob = globals()
-    import __builtin__ 
-    for name, value in __builtin__.__dict__.items():
-        try:
-            if issubclass(value, Exception):
-                glob[name] = value 
-        except TypeError:
-            pass
-
-_genex()
-del _genex
+ArithmeticError = ArithmeticError
+AssertionError = AssertionError
+AttributeError = AttributeError
+DeprecationWarning = DeprecationWarning
+EOFError = EOFError
+EnvironmentError = EnvironmentError
+Exception = Exception
+FloatingPointError = FloatingPointError
+FutureWarning = FutureWarning
+IOError = IOError
+ImportError = ImportError
+IndentationError = IndentationError
+IndexError = IndexError
+KeyError = KeyError
+KeyboardInterrupt = KeyboardInterrupt
+LookupError = LookupError
+MemoryError = MemoryError
+NameError = NameError
+NotImplementedError = NotImplementedError
+OSError = OSError
+OverflowError = OverflowError
+OverflowWarning = OverflowWarning
+PendingDeprecationWarning = PendingDeprecationWarning
+ReferenceError = ReferenceError
+RuntimeError = RuntimeError
+RuntimeWarning = RuntimeWarning
+StandardError = StandardError
+StopIteration = StopIteration
+SyntaxError = SyntaxError
+SyntaxWarning = SyntaxWarning
+SystemError = SystemError
+SystemExit = SystemExit
+TabError = TabError
+TypeError = TypeError
+UnboundLocalError = UnboundLocalError
+UnicodeDecodeError = UnicodeDecodeError
+UnicodeEncodeError = UnicodeEncodeError
+UnicodeError = UnicodeError
+UnicodeTranslateError = UnicodeTranslateError
+UserWarning = UserWarning
+ValueError = ValueError
+Warning = Warning
+ZeroDivisionError = ZeroDivisionError



More information about the Pypy-commit mailing list