summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-03 20:01:02 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-03 20:01:02 (GMT)
commit44eeaec173d66769835e4f8a2a0ad7e605fe6aef (patch)
tree64c0a3b6fdddbbd79d15a9b7ce1021f470701566 /Doc
parentcbcfe4f3e47d420742f726415705b116672d6779 (diff)
downloadcpython-44eeaec173d66769835e4f8a2a0ad7e605fe6aef.zip
cpython-44eeaec173d66769835e4f8a2a0ad7e605fe6aef.tar.gz
cpython-44eeaec173d66769835e4f8a2a0ad7e605fe6aef.tar.bz2
Patch #1537 from Chad Austin
Change GeneratorExit's base class from Exception to BaseException (This time I'm applying the patch to the correct sandbox.)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/exceptions.rst4
-rw-r--r--Doc/reference/expressions.rst3
2 files changed, 3 insertions, 4 deletions
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index 9fa5022..7b1f1b9 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -153,11 +153,13 @@ The following exceptions are the exceptions that are actually raised.
.. exception:: GeneratorExit
Raise when a :term:`generator`\'s :meth:`close` method is called. It
- directly inherits from :exc:`Exception` instead of :exc:`StandardError` since
+ directly inherits from :exc:`BaseException` instead of :exc:`StandardError` since
it is technically not an error.
.. versionadded:: 2.5
+ .. versionchanged:: 2.6
+ Changed to inherit from :exc:`BaseException`.
.. exception:: IOError
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index 706d0f1..0f45f94 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -430,9 +430,6 @@ generator functions::
... while True:
... try:
... value = (yield value)
- ... except GeneratorExit:
- ... # never catch GeneratorExit
- ... raise
... except Exception, e:
... value = e
... finally: