summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/long.rst55
1 files changed, 25 insertions, 30 deletions
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index c5c2aa6..a7bd43d 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -129,9 +129,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
single: OverflowError (built-in exception)
Return a C :c:type:`long` representation of *obj*. If *obj* is not an
- instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or
- :meth:`__int__` method (if present) to convert it to a
- :c:type:`PyLongObject`.
+ instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method
+ (if present) to convert it to a :c:type:`PyLongObject`.
Raise :exc:`OverflowError` if the value of *obj* is out of range for a
:c:type:`long`.
@@ -141,16 +140,15 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
.. versionchanged:: 3.8
Use :meth:`__index__` if available.
- .. deprecated:: 3.8
- Using :meth:`__int__` is deprecated.
+ .. versionchanged:: 3.10
+ This function will no longer use :meth:`__int__`.
.. c:function:: long PyLong_AsLongAndOverflow(PyObject *obj, int *overflow)
Return a C :c:type:`long` representation of *obj*. If *obj* is not an
- instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or
- :meth:`__int__` method (if present) to convert it to a
- :c:type:`PyLongObject`.
+ instance of :c:type:`PyLongObject`, first call its :meth:`__index__`
+ method (if present) to convert it to a :c:type:`PyLongObject`.
If the value of *obj* is greater than :const:`LONG_MAX` or less than
:const:`LONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, and
@@ -162,8 +160,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
.. versionchanged:: 3.8
Use :meth:`__index__` if available.
- .. deprecated:: 3.8
- Using :meth:`__int__` is deprecated.
+ .. versionchanged:: 3.10
+ This function will no longer use :meth:`__int__`.
.. c:function:: long long PyLong_AsLongLong(PyObject *obj)
@@ -172,9 +170,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
single: OverflowError (built-in exception)
Return a C :c:type:`long long` representation of *obj*. If *obj* is not an
- instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or
- :meth:`__int__` method (if present) to convert it to a
- :c:type:`PyLongObject`.
+ instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method
+ (if present) to convert it to a :c:type:`PyLongObject`.
Raise :exc:`OverflowError` if the value of *obj* is out of range for a
:c:type:`long long`.
@@ -184,16 +181,15 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
.. versionchanged:: 3.8
Use :meth:`__index__` if available.
- .. deprecated:: 3.8
- Using :meth:`__int__` is deprecated.
+ .. versionchanged:: 3.10
+ This function will no longer use :meth:`__int__`.
.. c:function:: long long PyLong_AsLongLongAndOverflow(PyObject *obj, int *overflow)
Return a C :c:type:`long long` representation of *obj*. If *obj* is not an
- instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or
- :meth:`__int__` method (if present) to convert it to a
- :c:type:`PyLongObject`.
+ instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method
+ (if present) to convert it to a :c:type:`PyLongObject`.
If the value of *obj* is greater than :const:`LLONG_MAX` or less than
:const:`LLONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively,
@@ -207,8 +203,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
.. versionchanged:: 3.8
Use :meth:`__index__` if available.
- .. deprecated:: 3.8
- Using :meth:`__int__` is deprecated.
+ .. versionchanged:: 3.10
+ This function will no longer use :meth:`__int__`.
.. c:function:: Py_ssize_t PyLong_AsSsize_t(PyObject *pylong)
@@ -278,10 +274,9 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
.. c:function:: unsigned long PyLong_AsUnsignedLongMask(PyObject *obj)
- Return a C :c:type:`unsigned long` representation of *obj*. If *obj*
- is not an instance of :c:type:`PyLongObject`, first call its
- :meth:`__index__` or :meth:`__int__` method (if present) to convert
- it to a :c:type:`PyLongObject`.
+ Return a C :c:type:`unsigned long` representation of *obj*. If *obj* is not
+ an instance of :c:type:`PyLongObject`, first call its :meth:`__index__`
+ method (if present) to convert it to a :c:type:`PyLongObject`.
If the value of *obj* is out of range for an :c:type:`unsigned long`,
return the reduction of that value modulo ``ULONG_MAX + 1``.
@@ -292,16 +287,16 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
.. versionchanged:: 3.8
Use :meth:`__index__` if available.
- .. deprecated:: 3.8
- Using :meth:`__int__` is deprecated.
+ .. versionchanged:: 3.10
+ This function will no longer use :meth:`__int__`.
.. c:function:: unsigned long long PyLong_AsUnsignedLongLongMask(PyObject *obj)
Return a C :c:type:`unsigned long long` representation of *obj*. If *obj*
is not an instance of :c:type:`PyLongObject`, first call its
- :meth:`__index__` or :meth:`__int__` method (if present) to convert
- it to a :c:type:`PyLongObject`.
+ :meth:`__index__` method (if present) to convert it to a
+ :c:type:`PyLongObject`.
If the value of *obj* is out of range for an :c:type:`unsigned long long`,
return the reduction of that value modulo ``ULLONG_MAX + 1``.
@@ -312,8 +307,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
.. versionchanged:: 3.8
Use :meth:`__index__` if available.
- .. deprecated:: 3.8
- Using :meth:`__int__` is deprecated.
+ .. versionchanged:: 3.10
+ This function will no longer use :meth:`__int__`.
.. c:function:: double PyLong_AsDouble(PyObject *pylong)