Skip to content

Commit fbc1c26

Browse files
Issue #19795: Improved markup of True/False constants.
1 parent 4b79518 commit fbc1c26

41 files changed

Lines changed: 92 additions & 80 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Doc/howto/curses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ RGB value. This lets you change color 1, which is usually red, to purple or
422422
blue or any other color you like. Unfortunately, the Linux console doesn't
423423
support this, so I'm unable to try it out, and can't provide any examples. You
424424
can check if your terminal can do this by calling
425-
:func:`~curses.can_change_color`, which returns True if the capability is
425+
:func:`~curses.can_change_color`, which returns ``True`` if the capability is
426426
there. If you're lucky enough to have such a talented terminal, consult your
427427
system's man pages for more information.
428428

Doc/howto/functional.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,8 @@ constructed list's :meth:`~list.sort` method. ::
687687

688688

689689
The :func:`any(iter) <any>` and :func:`all(iter) <all>` built-ins look at the
690-
truth values of an iterable's contents. :func:`any` returns True if any element
691-
in the iterable is a true value, and :func:`all` returns True if all of the
690+
truth values of an iterable's contents. :func:`any` returns ``True`` if any element
691+
in the iterable is a true value, and :func:`all` returns ``True`` if all of the
692692
elements are true values:
693693

694694
>>> any([0,1,0])

Doc/library/ast.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,6 @@ and classes for traversing abstract syntax trees:
244244
Return a formatted dump of the tree in *node*. This is mainly useful for
245245
debugging purposes. The returned string will show the names and the values
246246
for fields. This makes the code impossible to evaluate, so if evaluation is
247-
wanted *annotate_fields* must be set to False. Attributes such as line
247+
wanted *annotate_fields* must be set to ``False``. Attributes such as line
248248
numbers and column offsets are not dumped by default. If this is wanted,
249249
*include_attributes* can be set to ``True``.

Doc/library/bdb.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,17 +194,17 @@ The :mod:`bdb` module also defines two classes:
194194
.. method:: user_line(frame)
195195

196196
This method is called from :meth:`dispatch_line` when either
197-
:meth:`stop_here` or :meth:`break_here` yields True.
197+
:meth:`stop_here` or :meth:`break_here` yields ``True``.
198198

199199
.. method:: user_return(frame, return_value)
200200

201201
This method is called from :meth:`dispatch_return` when :meth:`stop_here`
202-
yields True.
202+
yields ``True``.
203203

204204
.. method:: user_exception(frame, exc_info)
205205

206206
This method is called from :meth:`dispatch_exception` when
207-
:meth:`stop_here` yields True.
207+
:meth:`stop_here` yields ``True``.
208208

209209
.. method:: do_clear(arg)
210210

@@ -245,7 +245,7 @@ The :mod:`bdb` module also defines two classes:
245245

246246
.. method:: set_quit()
247247

248-
Set the :attr:`quitting` attribute to True. This raises :exc:`BdbQuit` in
248+
Set the :attr:`quitting` attribute to ``True``. This raises :exc:`BdbQuit` in
249249
the next call to one of the :meth:`dispatch_\*` methods.
250250

251251

Doc/library/bz2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Incremental (de)compression
162162

163163
.. attribute:: eof
164164

165-
True if the end-of-stream marker has been reached.
165+
``True`` if the end-of-stream marker has been reached.
166166

167167
.. versionadded:: 3.3
168168

Doc/library/ctypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2242,7 +2242,7 @@ These are the fundamental ctypes data types:
22422242
.. class:: c_bool
22432243

22442244
Represent the C :c:type:`bool` datatype (more accurately, :c:type:`_Bool` from
2245-
C99). Its value can be True or False, and the constructor accepts any object
2245+
C99). Its value can be ``True`` or ``False``, and the constructor accepts any object
22462246
that has a truth value.
22472247

22482248

Doc/library/difflib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ The :class:`SequenceMatcher` class has this constructor:
359359
The *autojunk* parameter.
360360

361361
SequenceMatcher objects get three data attributes: *bjunk* is the
362-
set of elements of *b* for which *isjunk* is True; *bpopular* is the set of
362+
set of elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of
363363
non-junk elements considered popular by the heuristic (if it is not
364364
disabled); *b2j* is a dict mapping the remaining elements of *b* to a list
365365
of positions where they occur. All three are reset whenever *b* is reset

Doc/library/email.message.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Here are the methods of the :class:`Message` class:
7575

7676
Return ``True`` if the message's payload is a list of sub-\
7777
:class:`Message` objects, otherwise return ``False``. When
78-
:meth:`is_multipart` returns False, the payload should be a string object.
78+
:meth:`is_multipart` returns ``False``, the payload should be a string object.
7979

8080

8181
.. method:: set_unixfrom(unixfrom)

Doc/library/functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ are always available. They are listed here in alphabetical order.
4848

4949
.. function:: all(iterable)
5050

51-
Return True if all elements of the *iterable* are true (or if the iterable
51+
Return ``True`` if all elements of the *iterable* are true (or if the iterable
5252
is empty). Equivalent to::
5353

5454
def all(iterable):
@@ -60,8 +60,8 @@ are always available. They are listed here in alphabetical order.
6060

6161
.. function:: any(iterable)
6262

63-
Return True if any element of the *iterable* is true. If the iterable
64-
is empty, return False. Equivalent to::
63+
Return ``True`` if any element of the *iterable* is true. If the iterable
64+
is empty, return ``False``. Equivalent to::
6565

6666
def any(iterable):
6767
for element in iterable:
@@ -890,7 +890,7 @@ are always available. They are listed here in alphabetical order.
890890
the buffer will typically be 4096 or 8192 bytes long.
891891

892892
* "Interactive" text files (files for which :meth:`~io.IOBase.isatty`
893-
returns True) use line buffering. Other text files use the policy
893+
returns ``True``) use line buffering. Other text files use the policy
894894
described above for binary files.
895895

896896
*encoding* is the name of the encoding used to decode or encode the file.

Doc/library/gc.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ The :mod:`gc` module provides the following functions:
130130

131131
.. function:: is_tracked(obj)
132132

133-
Returns True if the object is currently tracked by the garbage collector,
134-
False otherwise. As a general rule, instances of atomic types aren't
133+
Returns ``True`` if the object is currently tracked by the garbage collector,
134+
``False`` otherwise. As a general rule, instances of atomic types aren't
135135
tracked and instances of non-atomic types (containers, user-defined
136136
objects...) are. However, some type-specific optimizations can be present
137137
in order to suppress the garbage collector footprint of simple instances

0 commit comments

Comments
 (0)