Skip to content

Commit 23ed559

Browse files
author
Bas van Beek
committed
Reworded parts of the constants documentation
Addresses #22336 (comment), #22336 (comment) & #22336 (comment)
1 parent 84ebe18 commit 23ed559

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Doc/library/constants.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,21 @@ A small number of constants live in the built-in namespace. They are:
1919

2020
.. data:: None
2121

22-
The sole value of the type :data:`types.NoneType`. ``None`` is frequently used to
23-
represent the absence of a value, as when default arguments are not passed to a
24-
function. Assignments to ``None`` are illegal and raise a :exc:`SyntaxError`.
22+
An object frequently used to represent the absence of a value, as when
23+
default arguments are not passed to a function. Assignments to ``None``
24+
are illegal and raise a :exc:`SyntaxError`.
25+
``None`` is the sole instance of the :data:`NoneType` type.
2526

2627

2728
.. data:: NotImplemented
2829

29-
Sole value of the type :data:`types.NotImplementedType` and a
30-
special value which should be returned by the binary special methods
30+
A special value which should be returned by the binary special methods
3131
(e.g. :meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:`__rsub__`,
3232
etc.) to indicate that the operation is not implemented with respect to
3333
the other type; may be returned by the in-place binary special methods
3434
(e.g. :meth:`__imul__`, :meth:`__iand__`, etc.) for the same purpose.
3535
It should not be evaluated in a boolean context.
36+
``NotImplemented`` is the sole instance of the :data:`types.NotImplementedType` type.
3637

3738
.. note::
3839

@@ -60,9 +61,9 @@ A small number of constants live in the built-in namespace. They are:
6061
.. index:: single: ...; ellipsis literal
6162
.. data:: Ellipsis
6263

63-
The same as the ellipsis literal "``...``" and sole value of the type
64-
:data:`types.EllipsisType`. Special value used mostly in conjunction
64+
The same as the ellipsis literal "``...``". Special value used mostly in conjunction
6565
with extended slicing syntax for user-defined container data types.
66+
``Ellipsis`` is the sole instance of the :data:`types.EllipsisType` type.
6667

6768

6869
.. data:: __debug__

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy