summaryrefslogtreecommitdiffstats
path: root/Lib/repr.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-09-04 19:14:14 (GMT)
committerGuido van Rossum <guido@python.org>2001-09-04 19:14:14 (GMT)
commit54e54c6877329e105406c48490f218faff59db39 (patch)
tree6bbdf1f6efaa2253af424f59dc9564a5458d6739 /Lib/repr.py
parentb8f22749853cf79bfbe3709309e67d1a448f4cab (diff)
downloadcpython-54e54c6877329e105406c48490f218faff59db39.zip
cpython-54e54c6877329e105406c48490f218faff59db39.tar.gz
cpython-54e54c6877329e105406c48490f218faff59db39.tar.bz2
The first batch of changes recommended by the fixdiv tool. These are
mostly changes of / operators into //. Once or twice I did more or less than recommended.
Diffstat (limited to 'Lib/repr.py')
-rw-r--r--Lib/repr.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/repr.py b/Lib/repr.py
index f418d1a..1b1f4f4 100644
--- a/Lib/repr.py
+++ b/Lib/repr.py
@@ -65,7 +65,7 @@ class Repr:
def repr_str(self, x, level):
s = `x[:self.maxstring]`
if len(s) > self.maxstring:
- i = max(0, (self.maxstring-3)/2)
+ i = max(0, (self.maxstring-3)//2)
j = max(0, self.maxstring-3-i)
s = `x[:i] + x[len(x)-j:]`
s = s[:i] + '...' + s[len(s)-j:]
@@ -73,7 +73,7 @@ class Repr:
def repr_long(self, x, level):
s = `x` # XXX Hope this isn't too slow...
if len(s) > self.maxlong:
- i = max(0, (self.maxlong-3)/2)
+ i = max(0, (self.maxlong-3)//2)
j = max(0, self.maxlong-3-i)
s = s[:i] + '...' + s[len(s)-j:]
return s
@@ -86,7 +86,7 @@ class Repr:
return '<' + x.__class__.__name__ + ' instance at ' + \
hex(id(x))[2:] + '>'
if len(s) > self.maxstring:
- i = max(0, (self.maxstring-3)/2)
+ i = max(0, (self.maxstring-3)//2)
j = max(0, self.maxstring-3-i)
s = s[:i] + '...' + s[len(s)-j:]
return s