Document rethrow_uncaught/reraise

This commit is contained in:
Takafumi Arakaki
2013-03-13 23:49:51 +01:00
parent 2b89dda5a6
commit 93bd00bba4
2 changed files with 31 additions and 2 deletions
+9
View File
@@ -91,6 +91,15 @@ def reraise(exception, traceback):
raise exception, None, traceback
""", 'blub', 'exec'))
reraise.__doc__ = """
Re-raise `exception` with a `traceback` object.
Usage::
reraise(Exception, sys.exc_info()[2])
"""
# StringIO (Python 2.5 has no io module), so use io only for py3k
try:
from StringIO import StringIO