Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a46ed66 commit 4dd85b3Copy full SHA for 4dd85b3
1 file changed
Doc/c-api/long.rst
@@ -372,6 +372,10 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
372
Set *\*value* to a signed C :c:expr:`int32_t` or :c:expr:`int64_t`
373
representation of *obj*.
374
375
+ If *obj* is not an instance of :c:type:`PyLongObject`, first call its
376
+ :meth:`~object.__index__` method (if present) to convert it to a
377
+ :c:type:`PyLongObject`.
378
+
379
If the *obj* value is out of range, raise an :exc:`OverflowError`.
380
381
Set *\*value* and return ``0`` on success.
0 commit comments