Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add impl-detail block for PyLong_FromLong docs #126422

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Doc/c-api/long.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.

Return a new :c:type:`PyLongObject` object from *v*, or ``NULL`` on failure.

The current implementation keeps an array of integer objects for all integers
between ``-5`` and ``256``. When you create an int in that range you actually
just get back a reference to the existing object.
.. impl-detail::

The CPython keeps an array of integer objects for all integers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The CPython keeps an array of integer objects for all integers
CPython keeps an array of integer objects for all integers

between ``-5`` and ``256``. When you create an int in that range
you actually just get back a reference to the existing object.


.. c:function:: PyObject* PyLong_FromUnsignedLong(unsigned long v)
Expand Down
Loading