mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
doc: Formatting and typo fixes (#98974)
This commit is contained in:
parent
d7a00f1e8e
commit
728e42fcf5
3 changed files with 10 additions and 10 deletions
|
|
@ -12,7 +12,7 @@ and `PEG <https://en.wikipedia.org/wiki/Parsing_expression_grammar>`_.
|
|||
In particular, ``&`` followed by a symbol, token or parenthesized
|
||||
group indicates a positive lookahead (i.e., is required to match but
|
||||
not consumed), while ``!`` indicates a negative lookahead (i.e., is
|
||||
required _not_ to match). We use the ``|`` separator to mean PEG's
|
||||
required *not* to match). We use the ``|`` separator to mean PEG's
|
||||
"ordered choice" (written as ``/`` in traditional PEG grammars). See
|
||||
:pep:`617` for more details on the grammar's syntax.
|
||||
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ statement, of a variable or attribute annotation and an optional assignment stat
|
|||
annotated_assignment_stmt: `augtarget` ":" `expression`
|
||||
: ["=" (`starred_expression` | `yield_expression`)]
|
||||
|
||||
The difference from normal :ref:`assignment` is that only single target is allowed.
|
||||
The difference from normal :ref:`assignment` is that only a single target is allowed.
|
||||
|
||||
For simple names as assignment targets, if in class or module scope,
|
||||
the annotations are evaluated and stored in a special class or module
|
||||
|
|
@ -365,8 +365,8 @@ target, then the interpreter evaluates the target except for the last
|
|||
IDEs.
|
||||
|
||||
.. versionchanged:: 3.8
|
||||
Now annotated assignments allow same expressions in the right hand side as
|
||||
the regular assignments. Previously, some expressions (like un-parenthesized
|
||||
Now annotated assignments allow the same expressions in the right hand side as
|
||||
regular assignments. Previously, some expressions (like un-parenthesized
|
||||
tuple expressions) caused a syntax error.
|
||||
|
||||
|
||||
|
|
@ -756,7 +756,7 @@ commas) the two steps are carried out separately for each clause, just
|
|||
as though the clauses had been separated out into individual import
|
||||
statements.
|
||||
|
||||
The details of the first step, finding and loading modules are described in
|
||||
The details of the first step, finding and loading modules, are described in
|
||||
greater detail in the section on the :ref:`import system <importsystem>`,
|
||||
which also describes the various types of packages and modules that can
|
||||
be imported, as well as all the hooks that can be used to customize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue