Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 778a910

Browse files
divyag9miss-islington
authored andcommitted
1 parent 4f098b3 commit 778a910

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

Doc/reference/executionmodel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ re-entering the offending piece of code from the top).
243243

244244
When an exception is not handled at all, the interpreter terminates execution of
245245
the program, or returns to its interactive main loop. In either case, it prints
246-
a stack backtrace, except when the exception is :exc:`SystemExit`.
246+
a stack traceback, except when the exception is :exc:`SystemExit`.
247247

248248
Exceptions are identified by class instances. The :keyword:`except` clause is
249249
selected depending on the class of the instance: it must reference the class of

Doc/reference/expressions.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ the single expression that makes up the expression list.
144144
.. index:: pair: empty; tuple
145145

146146
An empty pair of parentheses yields an empty tuple object. Since tuples are
147-
immutable, the rules for literals apply (i.e., two occurrences of the empty
147+
immutable, the same rules as for literals apply (i.e., two occurrences of the empty
148148
tuple may or may not yield the same object).
149149

150150
.. index::
@@ -479,8 +479,8 @@ will raise :exc:`AttributeError` or :exc:`TypeError`, while
479479
When the underlying iterator is complete, the :attr:`~StopIteration.value`
480480
attribute of the raised :exc:`StopIteration` instance becomes the value of
481481
the yield expression. It can be either set explicitly when raising
482-
:exc:`StopIteration`, or automatically when the sub-iterator is a generator
483-
(by returning a value from the sub-generator).
482+
:exc:`StopIteration`, or automatically when the subiterator is a generator
483+
(by returning a value from the subgenerator).
484484

485485
.. versionchanged:: 3.3
486486
Added ``yield from <expr>`` to delegate control flow to a subiterator.
@@ -499,7 +499,7 @@ on the right hand side of an assignment statement.
499499

500500
:pep:`380` - Syntax for Delegating to a Subgenerator
501501
The proposal to introduce the :token:`yield_from` syntax, making delegation
502-
to sub-generators easy.
502+
to subgenerators easy.
503503

504504
:pep:`525` - Asynchronous Generators
505505
The proposal that expanded on :pep:`492` by adding generator capabilities to
@@ -608,7 +608,7 @@ Asynchronous generator functions
608608
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
609609

610610
The presence of a yield expression in a function or method defined using
611-
:keyword:`async def` further defines the function as a
611+
:keyword:`async def` further defines the function as an
612612
:term:`asynchronous generator` function.
613613

614614
When an asynchronous generator function is called, it returns an
@@ -673,13 +673,13 @@ which are used to control the execution of a generator function.
673673

674674
Returns an awaitable which when run starts to execute the asynchronous
675675
generator or resumes it at the last executed yield expression. When an
676-
asynchronous generator function is resumed with a :meth:`~agen.__anext__`
676+
asynchronous generator function is resumed with an :meth:`~agen.__anext__`
677677
method, the current yield expression always evaluates to :const:`None` in
678678
the returned awaitable, which when run will continue to the next yield
679679
expression. The value of the :token:`expression_list` of the yield
680680
expression is the value of the :exc:`StopIteration` exception raised by
681681
the completing coroutine. If the asynchronous generator exits without
682-
yielding another value, the awaitable instead raises an
682+
yielding another value, the awaitable instead raises a
683683
:exc:`StopAsyncIteration` exception, signalling that the asynchronous
684684
iteration has completed.
685685

@@ -707,7 +707,7 @@ which are used to control the execution of a generator function.
707707
where the asynchronous generator was paused, and returns the next value
708708
yielded by the generator function as the value of the raised
709709
:exc:`StopIteration` exception. If the asynchronous generator exits
710-
without yielding another value, an :exc:`StopAsyncIteration` exception is
710+
without yielding another value, a :exc:`StopAsyncIteration` exception is
711711
raised by the awaitable.
712712
If the generator function does not catch the passed-in exception, or
713713
raises a different exception, then when the awaitable is run that exception
@@ -1579,7 +1579,7 @@ if :keyword:`in` raised that exception).
15791579
pair: membership; test
15801580
object: sequence
15811581

1582-
The operator :keyword:`not in` is defined to have the inverse true value of
1582+
The operator :keyword:`not in` is defined to have the inverse truth value of
15831583
:keyword:`in`.
15841584

15851585
.. index::
@@ -1594,8 +1594,8 @@ The operator :keyword:`not in` is defined to have the inverse true value of
15941594
Identity comparisons
15951595
--------------------
15961596

1597-
The operators :keyword:`is` and :keyword:`is not` test for object identity: ``x
1598-
is y`` is true if and only if *x* and *y* are the same object. Object identity
1597+
The operators :keyword:`is` and :keyword:`is not` test for an object's identity: ``x
1598+
is y`` is true if and only if *x* and *y* are the same object. An Object's identity
15991599
is determined using the :meth:`id` function. ``x is not y`` yields the inverse
16001600
truth value. [#]_
16011601

Doc/reference/lexical_analysis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Comments
7070
A comment starts with a hash character (``#``) that is not part of a string
7171
literal, and ends at the end of the physical line. A comment signifies the end
7272
of the logical line unless the implicit line joining rules are invoked. Comments
73-
are ignored by the syntax; they are not tokens.
73+
are ignored by the syntax.
7474

7575

7676
.. _encodings:

0 commit comments

Comments
 (0)