bpo-34118: memoryview, range, and tuple are classes (GH-17761) · python/cpython@ee9ff05

2 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -952,7 +952,7 @@ are always available. They are listed here in alphabetical order.

952952
953953
954954

.. _func-memoryview:

955-

.. function:: memoryview(obj)

955+

.. class:: memoryview(obj)

956956

:noindex:

957957
958958

Return a "memory view" object created from the given argument. See

@@ -1408,7 +1408,7 @@ are always available. They are listed here in alphabetical order.

14081408
14091409
14101410

.. _func-range:

1411-

.. function:: range(stop)

1411+

.. class:: range(stop)

14121412

range(start, stop[, step])

14131413

:noindex:

14141414

@@ -1655,7 +1655,7 @@ are always available. They are listed here in alphabetical order.

16551655
16561656
16571657

.. _func-tuple:

1658-

.. function:: tuple([iterable])

1658+

.. class:: tuple([iterable])

16591659

:noindex:

16601660
16611661

Rather than being a function, :class:`tuple` is actually an immutable

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,2 @@

1+

Tag memoryview, range, and tuple as classes, the same as list, etcetera, in

2+

the library manual built-in functions list.