summaryrefslogtreecommitdiff
path: root/documentation/index.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-10-29 20:54:24 -0400
committerBenjamin Peterson <benjamin@python.org>2014-10-29 20:54:24 -0400
commit7330876ca5a33ff17d30c430514e00a2650a51de (patch)
tree998168d25045fd0cefda921c2e09fe869f42288d /documentation/index.rst
parent0d77f9165f69e5f46ce364439484157bb193ff11 (diff)
downloadsix-7330876ca5a33ff17d30c430514e00a2650a51de.tar.gz
add raise_from (fixes #102)
Patch from Robert Collins.
Diffstat (limited to 'documentation/index.rst')
-rw-r--r--documentation/index.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/documentation/index.rst b/documentation/index.rst
index c7ca996..7851421 100644
--- a/documentation/index.rst
+++ b/documentation/index.rst
@@ -282,6 +282,13 @@ Python 2 and 3.
ok. :)
+.. function:: raise_from(exc_value, exc_value_from)
+
+ Raise an exception from a context. On Python 3, this is equivalent to
+ ``raise exc_value from exc_value_from``. On Python 2, which does not support
+ exception chaining, it is equivalent to ``raise exc_value``.
+
+
.. function:: reraise(exc_type, exc_value, exc_traceback=None)
Reraise an exception, possibly with a different traceback. In the simple