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

Skip to content

Commit 2c69e3d

Browse files
committed
we can call singleton types now
1 parent 7f94feb commit 2c69e3d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2706,7 +2706,7 @@ The Null Object
27062706

27072707
This object is returned by functions that don't explicitly return a value. It
27082708
supports no special operations. There is exactly one null object, named
2709-
``None`` (a built-in name).
2709+
``None`` (a built-in name). Calling ``type(None)`` produces the same singleton.
27102710

27112711
It is written as ``None``.
27122712

@@ -2718,7 +2718,8 @@ The Ellipsis Object
27182718

27192719
This object is commonly used by slicing (see :ref:`slicings`). It supports no
27202720
special operations. There is exactly one ellipsis object, named
2721-
:const:`Ellipsis` (a built-in name).
2721+
:const:`Ellipsis` (a built-in name). Calling ``type(Ellipsis)`` produces the
2722+
:const:`Ellipsis` singleton.
27222723

27232724
It is written as ``Ellipsis`` or ``...``.
27242725

@@ -2728,7 +2729,8 @@ The NotImplemented Object
27282729

27292730
This object is returned from comparisons and binary operations when they are
27302731
asked to operate on types they don't support. See :ref:`comparisons` for more
2731-
information.
2732+
information. There is exactly one ``NotImplemented`` object. Calling
2733+
``type(NotImplemented)`` produces the singleton instance.
27322734

27332735
It is written as ``NotImplemented``.
27342736

0 commit comments

Comments
 (0)