]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add note about new and improved xrange().
authorGuido van Rossum <guido@python.org>
Mon, 15 Jan 2001 19:11:10 +0000 (19:11 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 15 Jan 2001 19:11:10 +0000 (19:11 +0000)
Misc/NEWS

index 2b8e38dc7f947a22ece223e6dc4571323674bf7d..eb16282ddc231f3b675aac2227db6cc855adbb4f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -3,6 +3,14 @@ What's New in Python 2.1 alpha 1?
 
 Core language, builtins, and interpreter
 
+- The xrange() object implementation has been improved so that
+  xrange(sys.maxint) can be used on 64-bit platforms.  There's still a
+  limitation that in this case len(xrange(sys.maxint)) can't be
+  calculated, but the common idiom "for i in xrange(sys.maxint)" will
+  work fine as long as the index i doesn't actually reach 2**31.
+  (Python uses regular ints for sequence and string indices; fixing
+  that is much more work.)
+
 - Two changes to from...import:
 
   1) "from M import X" now works even if M is not a real module; it's