Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f9290773
Commit
f9290773
authored
Dec 03, 2007
by
Christian Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverting last commit. I had some staled data from an attempted svnmerge in my local sandbox
parent
e69c320d
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
683 deletions
+6
-683
Doc/library/exceptions.rst
Doc/library/exceptions.rst
+0
-7
Doc/reference/expressions.rst
Doc/reference/expressions.rst
+3
-0
Lib/distutils/msvc9compiler.py
Lib/distutils/msvc9compiler.py
+0
-658
Lib/test/exception_hierarchy.txt
Lib/test/exception_hierarchy.txt
+1
-1
Lib/test/test_generators.py
Lib/test/test_generators.py
+0
-13
Misc/NEWS
Misc/NEWS
+0
-2
Objects/exceptions.c
Objects/exceptions.c
+2
-2
No files found.
Doc/library/exceptions.rst
View file @
f9290773
...
...
@@ -135,13 +135,6 @@ 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:`BaseException` instead of :exc:`Exception` since
it is technically not an error.
.. versionchanged:: 3.0
Changed to inherit from :exc:`BaseException`.
Raise when a :term:`generator`\'s :meth:`close` method is called.
...
...
Doc/reference/expressions.rst
View file @
f9290773
...
...
@@ -413,6 +413,9 @@ generator functions::
... while True:
... try:
... value = (yield value)
... except GeneratorExit:
... # never catch GeneratorExit
... raise
... except Exception, e:
... value = e
... finally:
...
...
Lib/distutils/msvc9compiler.py
deleted
100644 → 0
View file @
e69c320d
This diff is collapsed.
Click to expand it.
Lib/test/exception_hierarchy.txt
View file @
f9290773
BaseException
+-- SystemExit
+-- KeyboardInterrupt
+-- GeneratorExit
+-- Exception
+-- GeneratorExit
+-- StopIteration
+-- ArithmeticError
| +-- FloatingPointError
...
...
Lib/test/test_generators.py
View file @
f9290773
...
...
@@ -1668,19 +1668,6 @@ And finalization:
exiting
GeneratorExit is not caught by except Exception:
>>> def f():
... try: yield
... except Exception: print 'except'
... finally: print 'finally'
>>> g = f()
>>> g.next()
>>> del g
finally
Now let's try some ill-behaved generators:
>>> def f():
...
...
Misc/NEWS
View file @
f9290773
...
...
@@ -245,8 +245,6 @@ Extension Modules
* operator module: div, idiv, __div__, __idiv__, isCallable, sequenceIncludes
* sys module: exc_clear(), exc_type, exc_value, exc_traceback
- Issue #1537: Changed GeneratorExit's base class from Exception to BaseException.
Library
-------
...
...
Objects/exceptions.c
View file @
f9290773
...
...
@@ -424,9 +424,9 @@ SimpleExtendsException(PyExc_Exception, StopIteration,
/*
* GeneratorExit extends
Base
Exception
* GeneratorExit extends Exception
*/
SimpleExtendsException
(
PyExc_
Base
Exception
,
GeneratorExit
,
SimpleExtendsException
(
PyExc_Exception
,
GeneratorExit
,
"Request that a generator exit."
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment