summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-04-04 17:28:12 +0000
committerThomas Wouters <thomas@python.org>2006-04-04 17:28:12 +0000
commitf4d8f390536416c083c687206be8e2687e26c9a3 (patch)
tree4566f835f37272b4553cc60c8b393ac56ff0d13c /Python/sysmodule.c
parent4aaaa49bacc59e4910fb929b7e6b641a1e66ca66 (diff)
downloadcpython-git-f4d8f390536416c083c687206be8e2687e26c9a3.tar.gz
Make xrange more Py_ssize_t aware, by assuming a Py_ssize_t is always at
least as big as a long. I believe this to be a safe assumption that is being made in many parts of CPython, but a check could be added. len(xrange(sys.maxint)) works now, so fix the testsuite's odd exception for 64-bit platforms too. It also fixes 'zip(xrange(sys.maxint), it)' as a portable-ish (if expensive) alternative to enumerate(it); since zip() now calls len(), this was breaking on (real) 64-bit platforms. No additional test was added for that behaviour.
Diffstat (limited to 'Python/sysmodule.c')
0 files changed, 0 insertions, 0 deletions