Small grammatical fixes courtesy of francismb@email.de
This commit is contained in:
parent
6037436ec8
commit
d6edada20d
|
@ -160,11 +160,11 @@ generator terminated "normally", i.e. it did not raise an exception).
|
|||
|
||||
A subtle issue is what will happen if the caller, having caught the
|
||||
``RuntimeError``, calls the generator object's ``__next__()`` method
|
||||
again. The answer is that it from this point on it will raise
|
||||
again. The answer is that from this point on it will raise
|
||||
``StopIteration`` -- the behavior is the same as when any other
|
||||
exception was raised by the generator.
|
||||
|
||||
Another logical consequence of the proposal: if somone uses
|
||||
Another logical consequence of the proposal: if someone uses
|
||||
``g.throw(StopIteration)`` to throw a ``StopIteration`` exception into
|
||||
a generator, if the generator doesn't catch it (which it could do
|
||||
using a ``try/except`` around the ``yield``), it will be transformed
|
||||
|
|
Loading…
Reference in New Issue