-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PEP 257: Use sys.maxsize
#2629
PEP 257: Use sys.maxsize
#2629
Conversation
In python3, sys.maxint changed to sys.maxsize.
Hmm, I'm not sure that that's accurate - |
Thank you for the response. These are my observations:
For python2
The sys.maxsize in python3 and sys.maxint in python2 within the same machine can be interchangeably used as both returns the same value 9223372036854775807. |
It so happens that, on your version of Python (and mine), Py2's maxint and maxsize are the same number as Py3's maxsize. Is it actually true that they are interchangeable though? Another consideration might be that, since this is talking about indentation, a "stupidly big" value might be sufficient. For instance, Hard to say which is best - |
Sphinx uses A [1] https://github.com/sphinx-doc/sphinx/blob/v5.0.1/sphinx/util/docstrings.py#L60-L71 |
Yes, it seems like both are different in different versions of python. Here is the one difference I have observed between python2 and python3: python2
In python version 2, python3
In python version 3, |
In python3, sys.maxint changed to sys.maxsize.