fixed typos
This commit is contained in:
parent
cea61e0c0a
commit
5c42550605
|
@ -21,7 +21,7 @@ Motivation and Summary
|
||||||
using generators as block templates, adding exception handling and
|
using generators as block templates, adding exception handling and
|
||||||
finalization to generators, and more. Besides praise it received
|
finalization to generators, and more. Besides praise it received
|
||||||
a lot of opposition from people who didn't like the fact that it
|
a lot of opposition from people who didn't like the fact that it
|
||||||
was, under the covers, a (optential) looping construct. This
|
was, under the covers, a (potential) looping construct. This
|
||||||
meant that break and continue in a block-statement would break or
|
meant that break and continue in a block-statement would break or
|
||||||
continue the block-statement, even if it was used as a non-looping
|
continue the block-statement, even if it was used as a non-looping
|
||||||
resource management tool.
|
resource management tool.
|
||||||
|
@ -176,7 +176,7 @@ Specification
|
||||||
If the "as VAR" part of the syntax is omitted, the "VAR =" part of
|
If the "as VAR" part of the syntax is omitted, the "VAR =" part of
|
||||||
the translation is omitted (but abc.__enter__() is still called).
|
the translation is omitted (but abc.__enter__() is still called).
|
||||||
|
|
||||||
The calling convention for abc.__exit__() is: as follows. If the
|
The calling convention for abc.__exit__() is as follows. If the
|
||||||
finally-suite was reached through normal completion of BLOCK or
|
finally-suite was reached through normal completion of BLOCK or
|
||||||
through a non-local goto (a break, continue or return statement in
|
through a non-local goto (a break, continue or return statement in
|
||||||
BLOCK), abc.__exit__() is called with three None arguments. If
|
BLOCK), abc.__exit__() is called with three None arguments. If
|
||||||
|
@ -190,9 +190,9 @@ Specification
|
||||||
example must commit or roll back the transaction depending on
|
example must commit or roll back the transaction depending on
|
||||||
whether an exception occurred or not. Rather than just having a
|
whether an exception occurred or not. Rather than just having a
|
||||||
boolean flag indicating whether an exception occurred, we pass the
|
boolean flag indicating whether an exception occurred, we pass the
|
||||||
complete exception information, for the benefor of an
|
complete exception information, for the benefit of an
|
||||||
exception-logging facility for example. Relying on sys.exc_info()
|
exception-logging facility for example. Relying on sys.exc_info()
|
||||||
to get att the exception information was rejected; sys.exc_info()
|
to get at the exception information was rejected; sys.exc_info()
|
||||||
has very complex semantics and it is perfectly possible that it
|
has very complex semantics and it is perfectly possible that it
|
||||||
returns the exception information for an exception that was caught
|
returns the exception information for an exception that was caught
|
||||||
ages ago. It was also proposed to add an additional boolean to
|
ages ago. It was also proposed to add an additional boolean to
|
||||||
|
|
Loading…
Reference in New Issue