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

Appearance settings

Commit 05c2fe1

Browse filesBrowse files
Format None, True, False and NotImplemented as literals (GH-118758)
1 parent bcb435e commit 05c2fe1
Copy full SHA for 05c2fe1
Expand file treeCollapse file tree

39 files changed

+85
-83
lines changed

‎Doc/c-api/object.rst

Copy file name to clipboardExpand all lines: Doc/c-api/object.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Object Protocol
6565
6666
Properly handle returning :c:data:`Py_NotImplemented` from within a C
6767
function (that is, create a new :term:`strong reference`
68-
to NotImplemented and return it).
68+
to :const:`NotImplemented` and return it).
6969
7070
7171
.. c:macro:: Py_PRINT_RAW

‎Doc/library/_thread.rst

Copy file name to clipboardExpand all lines: Doc/library/_thread.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ Lock objects have the following methods:
169169
time can acquire a lock --- that's their reason for existence).
170170

171171
If the *blocking* argument is present, the action depends on its
172-
value: if it is False, the lock is only acquired if it can be acquired
173-
immediately without waiting, while if it is True, the lock is acquired
172+
value: if it is false, the lock is only acquired if it can be acquired
173+
immediately without waiting, while if it is true, the lock is acquired
174174
unconditionally as above.
175175

176176
If the floating-point *timeout* argument is present and positive, it
177177
specifies the maximum wait time in seconds before returning. A negative
178178
*timeout* argument specifies an unbounded wait. You cannot specify
179-
a *timeout* if *blocking* is False.
179+
a *timeout* if *blocking* is false.
180180

181181
The return value is ``True`` if the lock is acquired successfully,
182182
``False`` if not.

‎Doc/library/asyncio-eventloop.rst

Copy file name to clipboardExpand all lines: Doc/library/asyncio-eventloop.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ Creating network servers
796796
:class:`str`, :class:`bytes`, and :class:`~pathlib.Path` paths
797797
are supported.
798798

799-
If *cleanup_socket* is True then the Unix socket will automatically
799+
If *cleanup_socket* is true then the Unix socket will automatically
800800
be removed from the filesystem when the server is closed, unless the
801801
socket has been replaced after the server has been created.
802802

‎Doc/library/asyncio-task.rst

Copy file name to clipboardExpand all lines: Doc/library/asyncio-task.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ Running Tasks Concurrently
538538
# [2, 6, 24]
539539

540540
.. note::
541-
If *return_exceptions* is False, cancelling gather() after it
541+
If *return_exceptions* is false, cancelling gather() after it
542542
has been marked done won't cancel any submitted awaitables.
543543
For instance, gather can be marked done after propagating an
544544
exception to the caller, therefore, calling ``gather.cancel()``

‎Doc/library/bdb.rst

Copy file name to clipboardExpand all lines: Doc/library/bdb.rst
+11-11Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The :mod:`bdb` module also defines two classes:
8686

8787
.. attribute:: temporary
8888

89-
True if a :class:`Breakpoint` at (file, line) is temporary.
89+
``True`` if a :class:`Breakpoint` at (file, line) is temporary.
9090

9191
.. attribute:: cond
9292

@@ -99,7 +99,7 @@ The :mod:`bdb` module also defines two classes:
9999

100100
.. attribute:: enabled
101101

102-
True if :class:`Breakpoint` is enabled.
102+
``True`` if :class:`Breakpoint` is enabled.
103103

104104
.. attribute:: bpbynumber
105105

@@ -215,22 +215,22 @@ The :mod:`bdb` module also defines two classes:
215215

216216
.. method:: is_skipped_line(module_name)
217217

218-
Return True if *module_name* matches any skip pattern.
218+
Return ``True`` if *module_name* matches any skip pattern.
219219

220220
.. method:: stop_here(frame)
221221

222-
Return True if *frame* is below the starting frame in the stack.
222+
Return ``True`` if *frame* is below the starting frame in the stack.
223223

224224
.. method:: break_here(frame)
225225

226-
Return True if there is an effective breakpoint for this line.
226+
Return ``True`` if there is an effective breakpoint for this line.
227227

228228
Check whether a line or function breakpoint exists and is in effect. Delete temporary
229229
breakpoints based on information from :func:`effective`.
230230

231231
.. method:: break_anywhere(frame)
232232

233-
Return True if any breakpoint exists for *frame*'s filename.
233+
Return ``True`` if any breakpoint exists for *frame*'s filename.
234234

235235
Derived classes should override these methods to gain control over debugger
236236
operation.
@@ -348,7 +348,7 @@ The :mod:`bdb` module also defines two classes:
348348

349349
.. method:: get_break(filename, lineno)
350350

351-
Return True if there is a breakpoint for *lineno* in *filename*.
351+
Return ``True`` if there is a breakpoint for *lineno* in *filename*.
352352

353353
.. method:: get_breaks(filename, lineno)
354354

@@ -412,7 +412,7 @@ Finally, the module defines the following functions:
412412

413413
.. function:: checkfuncname(b, frame)
414414

415-
Return True if we should break here, depending on the way the
415+
Return ``True`` if we should break here, depending on the way the
416416
:class:`Breakpoint` *b* was set.
417417

418418
If it was set via line number, it checks if
@@ -431,14 +431,14 @@ Finally, the module defines the following functions:
431431
:attr:`bplist <bdb.Breakpoint.bplist>` for the
432432
(:attr:`file <bdb.Breakpoint.file>`, :attr:`line <bdb.Breakpoint.line>`)
433433
(which must exist) that is :attr:`enabled <bdb.Breakpoint.enabled>`, for
434-
which :func:`checkfuncname` is True, and that has neither a False
434+
which :func:`checkfuncname` is true, and that has neither a false
435435
:attr:`condition <bdb.Breakpoint.cond>` nor positive
436436
:attr:`ignore <bdb.Breakpoint.ignore>` count. The *flag*, meaning that a
437-
temporary breakpoint should be deleted, is False only when the
437+
temporary breakpoint should be deleted, is ``False`` only when the
438438
:attr:`cond <bdb.Breakpoint.cond>` cannot be evaluated (in which case,
439439
:attr:`ignore <bdb.Breakpoint.ignore>` count is ignored).
440440

441-
If no such entry exists, then (None, None) is returned.
441+
If no such entry exists, then ``(None, None)`` is returned.
442442

443443

444444
.. function:: set_trace()

‎Doc/library/code.rst

Copy file name to clipboardExpand all lines: Doc/library/code.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ build applications which provide an interactive interpreter prompt.
2727

2828
Closely emulate the behavior of the interactive Python interpreter. This class
2929
builds on :class:`InteractiveInterpreter` and adds prompting using the familiar
30-
``sys.ps1`` and ``sys.ps2``, and input buffering. If *local_exit* is True,
30+
``sys.ps1`` and ``sys.ps2``, and input buffering. If *local_exit* is true,
3131
``exit()`` and ``quit()`` in the console will not raise :exc:`SystemExit`, but
3232
instead return to the calling code.
3333

‎Doc/library/compileall.rst

Copy file name to clipboardExpand all lines: Doc/library/compileall.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Public functions
226226
The *invalidation_mode* parameter was added.
227227

228228
.. versionchanged:: 3.7.2
229-
The *invalidation_mode* parameter's default value is updated to None.
229+
The *invalidation_mode* parameter's default value is updated to ``None``.
230230

231231
.. versionchanged:: 3.8
232232
Setting *workers* to 0 now chooses the optimal number of cores.
@@ -289,7 +289,7 @@ Public functions
289289
The *invalidation_mode* parameter was added.
290290

291291
.. versionchanged:: 3.7.2
292-
The *invalidation_mode* parameter's default value is updated to None.
292+
The *invalidation_mode* parameter's default value is updated to ``None``.
293293

294294
.. versionchanged:: 3.9
295295
Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* arguments.
@@ -318,7 +318,7 @@ Public functions
318318
The *invalidation_mode* parameter was added.
319319

320320
.. versionchanged:: 3.7.2
321-
The *invalidation_mode* parameter's default value is updated to None.
321+
The *invalidation_mode* parameter's default value is updated to ``None``.
322322

323323
To force a recompile of all the :file:`.py` files in the :file:`Lib/`
324324
subdirectory and all its subdirectories::

‎Doc/library/csv.rst

Copy file name to clipboardExpand all lines: Doc/library/csv.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ The :mod:`csv` module defines the following constants:
349349
``None``. This is similar to :data:`QUOTE_ALL`, except that if a
350350
field value is ``None`` an empty (unquoted) string is written.
351351

352-
Instructs :class:`reader` objects to interpret an empty (unquoted) field as None and
353-
to otherwise behave as :data:`QUOTE_ALL`.
352+
Instructs :class:`reader` objects to interpret an empty (unquoted) field
353+
as ``None`` and to otherwise behave as :data:`QUOTE_ALL`.
354354

355355
.. versionadded:: 3.12
356356

‎Doc/library/dataclasses.rst

Copy file name to clipboardExpand all lines: Doc/library/dataclasses.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ Module contents
278278
generated equality and comparison methods (:meth:`~object.__eq__`,
279279
:meth:`~object.__gt__`, et al.).
280280

281-
- *metadata*: This can be a mapping or None. None is treated as
281+
- *metadata*: This can be a mapping or ``None``. ``None`` is treated as
282282
an empty dict. This value is wrapped in
283283
:func:`~types.MappingProxyType` to make it read-only, and exposed
284284
on the :class:`Field` object. It is not used at all by Data

‎Doc/library/functools.rst

Copy file name to clipboardExpand all lines: Doc/library/functools.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ The :mod:`functools` module defines the following functions:
325325
.. versionadded:: 3.2
326326

327327
.. versionchanged:: 3.4
328-
Returning NotImplemented from the underlying comparison function for
328+
Returning ``NotImplemented`` from the underlying comparison function for
329329
unrecognised types is now supported.
330330

331331
.. function:: partial(func, /, *args, **keywords)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.