diff options
author | Georg Brandl <georg@python.org> | 2007-12-02 09:40:06 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-12-02 09:40:06 (GMT) |
commit | 1a3284ed69d545e4ef59869998cb8c29233a45fa (patch) | |
tree | 98728a9b7aae6188ee8124160007a9d5c5277f8c /Lib/repr.py | |
parent | 87f9c53937ce47f55851ac7c71a94e46cf9142bf (diff) | |
download | cpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.zip cpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.tar.gz cpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.tar.bz2 |
#1535: rename __builtin__ module to builtins.
Diffstat (limited to 'Lib/repr.py')
-rw-r--r-- | Lib/repr.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/repr.py b/Lib/repr.py index ceb36f9..9893c71 100644 --- a/Lib/repr.py +++ b/Lib/repr.py @@ -2,7 +2,7 @@ __all__ = ["Repr","repr"] -import __builtin__ +import builtins from itertools import islice class Repr: @@ -84,16 +84,16 @@ class Repr: return '{%s}' % (s,) def repr_str(self, x, level): - s = __builtin__.repr(x[:self.maxstring]) + s = builtins.repr(x[:self.maxstring]) if len(s) > self.maxstring: i = max(0, (self.maxstring-3)//2) j = max(0, self.maxstring-3-i) - s = __builtin__.repr(x[:i] + x[len(x)-j:]) + s = builtins.repr(x[:i] + x[len(x)-j:]) s = s[:i] + '...' + s[len(s)-j:] return s def repr_int(self, x, level): - s = __builtin__.repr(x) # XXX Hope this isn't too slow... + s = builtins.repr(x) # XXX Hope this isn't too slow... if len(s) > self.maxlong: i = max(0, (self.maxlong-3)//2) j = max(0, self.maxlong-3-i) @@ -102,7 +102,7 @@ class Repr: def repr_instance(self, x, level): try: - s = __builtin__.repr(x) + s = builtins.repr(x) # Bugs in x.__repr__() can cause arbitrary # exceptions -- then make up something except Exception: |