Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit07471cd

Browse files
authored
[3.11]gh-110631: Fix reST indentation inDoc/library (GH-110685) (#110737)
* [3.11]gh-110631: Fix reST indentation in `Doc/library` (GH-110685)Fix wrong indentation in the Doc/library dir..(cherry picked from commitbb7923f)Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>* Fix merge glitch.
1 parentfd061a9 commit07471cd

33 files changed

+920
-914
lines changed

‎Doc/library/__main__.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,45 +54,45 @@ The top-level code environment can be:
5454

5555
* the scope of an interactive prompt::
5656

57-
>>> __name__
58-
'__main__'
57+
>>> __name__
58+
'__main__'
5959

6060
* the Python module passed to the Python interpreter as a file argument:
6161

62-
..code-block::shell-session
62+
..code-block::shell-session
6363
64-
$ python3 helloworld.py
65-
Hello, world!
64+
$ python3 helloworld.py
65+
Hello, world!
6666
6767
* the Python module or package passed to the Python interpreter with the
6868
:option:`-m` argument:
6969

70-
..code-block::shell-session
70+
..code-block::shell-session
7171
72-
$ python3 -m tarfile
73-
usage: tarfile.py [-h] [-v] (...)
72+
$ python3 -m tarfile
73+
usage: tarfile.py [-h] [-v] (...)
7474
7575
* Python code read by the Python interpreter from standard input:
7676

77-
..code-block::shell-session
77+
..code-block::shell-session
7878
79-
$ echo "import this" | python3
80-
The Zen of Python, by Tim Peters
79+
$ echo "import this" | python3
80+
The Zen of Python, by Tim Peters
8181
82-
Beautiful is better than ugly.
83-
Explicit is better than implicit.
84-
...
82+
Beautiful is better than ugly.
83+
Explicit is better than implicit.
84+
...
8585
8686
* Python code passed to the Python interpreter with the:option:`-c` argument:
8787

88-
..code-block::shell-session
88+
..code-block::shell-session
8989
90-
$ python3 -c "import this"
91-
The Zen of Python, by Tim Peters
90+
$ python3 -c "import this"
91+
The Zen of Python, by Tim Peters
9292
93-
Beautiful is better than ugly.
94-
Explicit is better than implicit.
95-
...
93+
Beautiful is better than ugly.
94+
Explicit is better than implicit.
95+
...
9696
9797
In each of these situations, the top-level module's ``__name__`` is set to
9898
``'__main__'``.
@@ -102,9 +102,9 @@ top-level environment by checking its own ``__name__``, which allows a common
102102
idiom for conditionally executing code when the module is not initialized from
103103
an import statement::
104104

105-
if __name__ == '__main__':
106-
# Execute when the module is not initialized from an import statement.
107-
...
105+
if __name__ == '__main__':
106+
# Execute when the module is not initialized from an import statement.
107+
...
108108

109109
..seealso::
110110

‎Doc/library/_thread.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ In addition to these methods, lock objects can also be used via the
206206

207207
**Caveats:**
208208

209-
..index::pair: module; signal
209+
..index::pair: module; signal
210210

211211
* Threads interact strangely with interrupts: the:exc:`KeyboardInterrupt`
212212
exception will be received by an arbitrary thread. (When the:mod:`signal`

‎Doc/library/binascii.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ The :mod:`binascii` module defines the following functions:
5858
data will raise:exc:`binascii.Error`.
5959

6060
Valid base64:
61-
* Conforms to:rfc:`3548`.
62-
* Contains only characters from the base64 alphabet.
63-
* Contains no excess data after padding (including excess padding, newlines, etc.).
64-
* Does not start with a padding.
61+
62+
* Conforms to:rfc:`3548`.
63+
* Contains only characters from the base64 alphabet.
64+
* Contains no excess data after padding (including excess padding, newlines, etc.).
65+
* Does not start with a padding.
6566

6667
..versionchanged::3.11
6768
Added the *strict_mode* parameter.

‎Doc/library/collections.rst

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -120,26 +120,26 @@ The class can be used to simulate nested scopes and is useful in templating.
120120

121121
..seealso::
122122

123-
* The `MultiContext class
124-
<https://github.com/enthought/codetools/blob/4.0.0/codetools/contexts/multi_context.py>`_
125-
in the Enthought `CodeTools package
126-
<https://github.com/enthought/codetools>`_ has options to support
127-
writing to any mapping in the chain.
123+
* The `MultiContext class
124+
<https://github.com/enthought/codetools/blob/4.0.0/codetools/contexts/multi_context.py>`_
125+
in the Enthought `CodeTools package
126+
<https://github.com/enthought/codetools>`_ has options to support
127+
writing to any mapping in the chain.
128128

129-
* Django's `Context class
130-
<https://github.com/django/django/blob/main/django/template/context.py>`_
131-
for templating is a read-only chain of mappings. It also features
132-
pushing and popping of contexts similar to the
133-
:meth:`~collections.ChainMap.new_child` method and the
134-
:attr:`~collections.ChainMap.parents` property.
129+
* Django's `Context class
130+
<https://github.com/django/django/blob/main/django/template/context.py>`_
131+
for templating is a read-only chain of mappings. It also features
132+
pushing and popping of contexts similar to the
133+
:meth:`~collections.ChainMap.new_child` method and the
134+
:attr:`~collections.ChainMap.parents` property.
135135

136-
* The `Nested Contexts recipe
137-
<https://code.activestate.com/recipes/577434/>`_ has options to control
138-
whether writes and other mutations apply only to the first mapping or to
139-
any mapping in the chain.
136+
* The `Nested Contexts recipe
137+
<https://code.activestate.com/recipes/577434/>`_ has options to control
138+
whether writes and other mutations apply only to the first mapping or to
139+
any mapping in the chain.
140140

141-
* A `greatly simplified read-only version of Chainmap
142-
<https://code.activestate.com/recipes/305268/>`_.
141+
* A `greatly simplified read-only version of Chainmap
142+
<https://code.activestate.com/recipes/305268/>`_.
143143

144144

145145
:class:`ChainMap` Examples and Recipes
@@ -428,22 +428,22 @@ or subtracting from an empty counter.
428428

429429
..seealso::
430430

431-
* `Bag class<https://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html>`_
432-
in Smalltalk.
431+
* `Bag class<https://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html>`_
432+
in Smalltalk.
433433

434-
* Wikipedia entry for `Multisets<https://en.wikipedia.org/wiki/Multiset>`_.
434+
* Wikipedia entry for `Multisets<https://en.wikipedia.org/wiki/Multiset>`_.
435435

436-
* `C++ multisets<http://www.java2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm>`_
437-
tutorial with examples.
436+
* `C++ multisets<http://www.java2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm>`_
437+
tutorial with examples.
438438

439-
* For mathematical operations on multisets and their use cases, see
440-
*Knuth, Donald. The Art of Computer Programming Volume II,
441-
Section 4.6.3, Exercise 19*.
439+
* For mathematical operations on multisets and their use cases, see
440+
*Knuth, Donald. The Art of Computer Programming Volume II,
441+
Section 4.6.3, Exercise 19*.
442442

443-
* To enumerate all distinct multisets of a given size over a given set of
444-
elements, see:func:`itertools.combinations_with_replacement`::
443+
* To enumerate all distinct multisets of a given size over a given set of
444+
elements, see:func:`itertools.combinations_with_replacement`::
445445

446-
map(Counter, combinations_with_replacement('ABC', 2)) # --> AA AB AC BB BC CC
446+
map(Counter, combinations_with_replacement('ABC', 2)) # --> AA AB AC BB BC CC
447447

448448

449449
:class:`deque` objects
@@ -1058,20 +1058,20 @@ fields:
10581058

10591059
..seealso::
10601060

1061-
* See:class:`typing.NamedTuple` for a way to add type hints for named
1062-
tuples. It also provides an elegant notation using the:keyword:`class`
1063-
keyword::
1061+
* See:class:`typing.NamedTuple` for a way to add type hints for named
1062+
tuples. It also provides an elegant notation using the:keyword:`class`
1063+
keyword::
10641064

1065-
class Component(NamedTuple):
1066-
part_number: int
1067-
weight: float
1068-
description: Optional[str] = None
1065+
class Component(NamedTuple):
1066+
part_number: int
1067+
weight: float
1068+
description: Optional[str] = None
10691069

1070-
* See:meth:`types.SimpleNamespace` for a mutable namespace based on an
1071-
underlying dictionary instead of a tuple.
1070+
* See:meth:`types.SimpleNamespace` for a mutable namespace based on an
1071+
underlying dictionary instead of a tuple.
10721072

1073-
* The:mod:`dataclasses` module provides a decorator and functions for
1074-
automatically adding generated special methods to user-defined classes.
1073+
* The:mod:`dataclasses` module provides a decorator and functions for
1074+
automatically adding generated special methods to user-defined classes.
10751075

10761076

10771077
:class:`OrderedDict` objects

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp