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

Skip to content

Commit 989db5c

Browse files
Issue #19795: Mark up None as literal text.
2 parents 24c3b49 + ecf41da commit 989db5c

53 files changed

Lines changed: 112 additions & 110 deletions

Some content is hidden

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

Doc/c-api/none.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
.. _noneobject:
44

5-
The None Object
6-
---------------
5+
The ``None`` Object
6+
-------------------
77

88
.. index:: object: None
99

@@ -23,4 +23,4 @@ same reason.
2323
.. c:macro:: Py_RETURN_NONE
2424
2525
Properly handle returning :c:data:`Py_None` from within a C function (that is,
26-
increment the reference count of None and return it.)
26+
increment the reference count of ``None`` and return it.)

Doc/c-api/unicode.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,11 +1415,11 @@ included in the :mod:`encodings` package). The codec uses mapping to encode and
14151415
decode characters.
14161416
14171417
Decoding mappings must map single string characters to single Unicode
1418-
characters, integers (which are then interpreted as Unicode ordinals) or None
1418+
characters, integers (which are then interpreted as Unicode ordinals) or ``None``
14191419
(meaning "undefined mapping" and causing an error).
14201420
14211421
Encoding mappings must map single Unicode characters to single string
1422-
characters, integers (which are then interpreted as Latin-1 ordinals) or None
1422+
characters, integers (which are then interpreted as Latin-1 ordinals) or ``None``
14231423
(meaning "undefined mapping" and causing an error).
14241424
14251425
The mapping objects provided must only support the __getitem__ mapping
@@ -1460,7 +1460,7 @@ The following codec API is special in that maps Unicode to Unicode.
14601460
*NULL* when an exception was raised by the codec.
14611461
14621462
The *mapping* table must map Unicode ordinal integers to Unicode ordinal
1463-
integers or None (causing deletion of the character).
1463+
integers or ``None`` (causing deletion of the character).
14641464
14651465
Mapping tables need only provide the :meth:`__getitem__` interface; dictionaries
14661466
and sequences work well. Unmapped character ordinals (ones which cause a
@@ -1577,7 +1577,7 @@ They all return *NULL* or ``-1`` if an exception occurs.
15771577
resulting Unicode object.
15781578
15791579
The mapping table must map Unicode ordinal integers to Unicode ordinal integers
1580-
or None (causing deletion of the character).
1580+
or ``None`` (causing deletion of the character).
15811581
15821582
Mapping tables need only provide the :meth:`__getitem__` interface; dictionaries
15831583
and sequences work well. Unmapped character ordinals (ones which cause a

Doc/howto/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ The output suggests that bound and unbound methods are two different types.
302302
While they could have been implemented that way, the actual C implementation of
303303
:c:type:`PyMethod_Type` in :source:`Objects/classobject.c` is a single object
304304
with two different representations depending on whether the :attr:`im_self`
305-
field is set or is *NULL* (the C equivalent of *None*).
305+
field is set or is *NULL* (the C equivalent of ``None``).
306306

307307
Likewise, the effects of calling a method object depend on the :attr:`im_self`
308308
field. If set (meaning bound), the original function (stored in the

Doc/howto/logging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ In Python 3.2 and later, the behaviour is as follows:
764764
The handler's level is set to ``WARNING``, so all events at this and
765765
greater severities will be output.
766766

767-
To obtain the pre-3.2 behaviour, ``logging.lastResort`` can be set to *None*.
767+
To obtain the pre-3.2 behaviour, ``logging.lastResort`` can be set to ``None``.
768768

769769
.. _library-config:
770770

Doc/howto/sorting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ returns a new sorted list::
2424
[1, 2, 3, 4, 5]
2525

2626
You can also use the :meth:`list.sort` method. It modifies the list
27-
in-place (and returns *None* to avoid confusion). Usually it's less convenient
27+
in-place (and returns ``None`` to avoid confusion). Usually it's less convenient
2828
than :func:`sorted` - but if you don't need the original list, it's slightly
2929
more efficient.
3030

Doc/library/argparse.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,7 @@ Sub-commands
15521552
positional arguments
15531553

15541554
* description - description for the sub-parser group in help output, by
1555-
default None
1555+
default ``None``
15561556

15571557
* prog - usage information that will be displayed with sub-command help,
15581558
by default the name of the program and any positional arguments before the
@@ -1565,12 +1565,12 @@ Sub-commands
15651565
encountered at the command line
15661566

15671567
* dest_ - name of the attribute under which sub-command name will be
1568-
stored; by default None and no value is stored
1568+
stored; by default ``None`` and no value is stored
15691569

1570-
* help_ - help for sub-parser group in help output, by default None
1570+
* help_ - help for sub-parser group in help output, by default ``None``
15711571

15721572
* metavar_ - string presenting available sub-commands in help; by default it
1573-
is None and presents sub-commands in form {cmd1, cmd2, ..}
1573+
is ``None`` and presents sub-commands in form {cmd1, cmd2, ..}
15741574

15751575
Some example usage::
15761576

Doc/library/asyncio-protocol.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,10 @@ The following callbacks are called on :class:`Protocol` instances:
372372
(for example by calling :meth:`write_eof`, if the other end also uses
373373
asyncio).
374374

375-
This method may return a false value (including None), in which case
375+
This method may return a false value (including ``None``), in which case
376376
the transport will close itself. Conversely, if this method returns a
377377
true value, closing the transport is up to the protocol. Since the
378-
default implementation returns None, it implicitly closes the connection.
378+
default implementation returns ``None``, it implicitly closes the connection.
379379

380380
.. note::
381381
Some transports such as SSL don't support half-closed connections,

Doc/library/asyncore.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ any that have been added to the map during asynchronous service) is closed.
5757

5858
Enter a polling loop that terminates after count passes or all open
5959
channels have been closed. All arguments are optional. The *count*
60-
parameter defaults to None, resulting in the loop terminating only when all
60+
parameter defaults to ``None``, resulting in the loop terminating only when all
6161
channels have been closed. The *timeout* argument sets the timeout
6262
parameter for the appropriate :func:`~select.select` or :func:`~select.poll`
6363
call, measured in seconds; the default is 30 seconds. The *use_poll*

Doc/library/bdb.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ The :mod:`bdb` module also defines two classes:
241241
.. method:: set_continue()
242242

243243
Stop only at breakpoints or when finished. If there are no breakpoints,
244-
set the system trace function to None.
244+
set the system trace function to ``None``.
245245

246246
.. method:: set_quit()
247247

Doc/library/code.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ interpreter objects as well as the following additions.
150150

151151
The optional *exitmsg* argument specifies an exit message printed when exiting.
152152
Pass the empty string to suppress the exit message. If *exitmsg* is not given or
153-
None, a default message is printed.
153+
``None``, a default message is printed.
154154

155155
.. versionchanged:: 3.4
156156
To suppress printing any banner, pass an empty string.

0 commit comments

Comments
 (0)