[Python-checkins] peps: Clarify the what the xrange representation issue was.

georg.brandl python-checkins at python.org
Wed Mar 23 21:25:28 CET 2011


http://hg.python.org/peps/rev/cfaed15efd04
changeset:   115:cfaed15efd04
user:        Fred Drake <fdrake at acm.org>
date:        Fri Aug 18 20:26:47 2000 +0000
summary:
  Clarify the what the xrange representation issue was.

files:
  pep-0200.txt |  7 ++++++-
  1 files changed, 6 insertions(+), 1 deletions(-)


diff --git a/pep-0200.txt b/pep-0200.txt
--- a/pep-0200.txt
+++ b/pep-0200.txt
@@ -157,7 +157,12 @@
       [at least I *think* it's done, as of 15-Aug-2000 - tim]
 
     * Fix xrange printing behavior - Fred Drake
-      [although I'm not sure what this one was talking about - tim]
+      Remove the tp_print handler for the xrange type; it produced a
+      list display instead of 'xrange(...)'.  The new code produces a
+      minimal call to xrange(), enclosed in (... * N) when N != 1.
+      This makes the repr() more human readable while making it do
+      what reprs are advertised as doing.  It also makes the xrange
+      objects obvious when working in the interactive interpreter.
 
 
 Accepted and in progress

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list