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

sys.maxsize is the maximum length of a container. #2441

Merged
merged 1 commit into from Sep 28, 2012

Conversation

bfroehle
Copy link
Contributor

From the Python documentation:

sys.maxsize:
The largest positive integer supported by the platform's
Py_ssize_t type, and thus the maximum size lists, strings,
dicts, and many other containers can have.

From our usage in the traitlet, it's clear that what we really
mean is sys.maxsize (not sys.maxint). In general
sys.maxsize >= sys.maxint so this patch shouldn't have any
actual impact.

I noticed this only because Python 3 has no sys.maxint attribute.
This is our only usage of sys.maxint which isn't protected by a
if not PY3 statement.

From the Python documentation:

> sys.maxsize:
>   The largest positive integer supported by the platform's
>   Py_ssize_t type, and thus the maximum size lists, strings,
>   dicts, and many other containers can have.
@takluyver
Copy link
Member

Thanks, that looks sensible. Merging now.

takluyver added a commit that referenced this pull request Sep 28, 2012
`sys.maxsize` is the maximum length of a container.
@takluyver takluyver merged commit d38a6a3 into ipython:master Sep 28, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
`sys.maxsize` is the maximum length of a container.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants