Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Impose new limit for Python integers #123497

Copy link
Copy link

Description

@serhiy-storchaka
Issue body actions

The upper limit of Python integers is determined by by the size of addressable memory. On 64-bit platforms this is about $2^{63}$ bytes or about $15\cdot 2^{62} < 2^{66}$ bits. Unfortunately, the number of bits of some integers cannot be represented as a 64-bit integer, this complicates the code.

The following PR lowers the limit to about $2^{64}$ bits or about $2^{65}/15 > 2^{61}$ bytes. It is still much larger than practically achievable (larger that the limit of addressable memory in modern processors).

First proposed in #121486, then discussed in https://discuss.python.org/t/imposing-a-hard-limit-on-python-integers/62302.

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.