Skip to content

Commit d1678bc

Browse files
author
alexandre.vassalotti
committed
Changed references to the reprlib module to use its new name.
git-svn-id: http://svn.python.org/projects/python/trunk@63357 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent d0dca80 commit d1678bc

12 files changed

Lines changed: 28 additions & 29 deletions

File tree

Demo/pdist/cmptree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Compare local and remote dictionaries and transfer differing files -- like rdist."""
22

33
import sys
4-
from repr import repr
4+
from reprlib import repr
55
import FSProxy
66
import time
77
import os

Demo/pdist/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import socket
55
import pickle
66
from fnmatch import fnmatch
7-
from repr import repr
7+
from reprlib import repr
88

99

1010
# Default verbosity (0 = silent, 1 = print connections, 2 = print requests too)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

2-
:mod:`repr` --- Alternate :func:`repr` implementation
2+
:mod:`reprlib` --- Alternate :func:`repr` implementation
33
=====================================================
44

5-
.. module:: repr
5+
.. module:: reprlib
66
:synopsis: Alternate repr() implementation with size limits.
77
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
88

99

10-
The :mod:`repr` module provides a means for producing object representations
10+
The :mod:`reprlib` module provides a means for producing object representations
1111
with limits on the size of the resulting strings. This is used in the Python
1212
debugger and may be useful in other contexts as well.
1313

Doc/tutorial/stdlib2.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ programming needs. These modules rarely occur in small scripts.
1313
Output Formatting
1414
=================
1515

16-
The :mod:`repr` module provides a version of :func:`repr` customized for
16+
The :mod:`reprlib` module provides a version of :func:`repr` customized for
1717
abbreviated displays of large or deeply nested containers::
1818

19-
>>> import repr
20-
>>> repr.repr(set('supercalifragilisticexpialidocious'))
19+
>>> import reprlib
20+
>>> reprlib.repr(set('supercalifragilisticexpialidocious'))
2121
"set(['a', 'c', 'd', 'e', 'f', 'g', ...])"
2222

2323
The :mod:`pprint` module offers more sophisticated control over printing both

Lib/bdb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def get_stack(self, f, t):
325325
#
326326

327327
def format_stack_entry(self, frame_lineno, lprefix=': '):
328-
import linecache, repr
328+
import linecache, reprlib
329329
frame, lineno = frame_lineno
330330
filename = self.canonic(frame.f_code.co_filename)
331331
s = '%s(%r)' % (filename, lineno)
@@ -338,13 +338,13 @@ def format_stack_entry(self, frame_lineno, lprefix=': '):
338338
else:
339339
args = None
340340
if args:
341-
s = s + repr.repr(args)
341+
s = s + reprlib.repr(args)
342342
else:
343343
s = s + '()'
344344
if '__return__' in frame.f_locals:
345345
rv = frame.f_locals['__return__']
346346
s = s + '->'
347-
s = s + repr.repr(rv)
347+
s = s + reprlib.repr(rv)
348348
line = linecache.getline(filename, lineno)
349349
if line: s = s + lprefix + line.strip()
350350
return s

Lib/copy.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -399,17 +399,16 @@ def __deepcopy__(self, memo=None):
399399
print l2
400400
l.append({l[1]: l, 'xyz': l[2]})
401401
l3 = copy(l)
402-
import repr
403-
print map(repr.repr, l)
404-
print map(repr.repr, l1)
405-
print map(repr.repr, l2)
406-
print map(repr.repr, l3)
402+
import reprlib
403+
print map(reprlib.repr, l)
404+
print map(reprlib.repr, l1)
405+
print map(reprlib.repr, l2)
406+
print map(reprlib.repr, l3)
407407
l3 = deepcopy(l)
408-
import repr
409-
print map(repr.repr, l)
410-
print map(repr.repr, l1)
411-
print map(repr.repr, l2)
412-
print map(repr.repr, l3)
408+
print map(reprlib.repr, l)
409+
print map(reprlib.repr, l1)
410+
print map(reprlib.repr, l2)
411+
print map(reprlib.repr, l3)
413412

414413
if __name__ == '__main__':
415414
_test()

Lib/idlelib/Debugger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ def __init__(self, master, title, dict=None):
413413
height = 20*len(dict) # XXX 20 == observed height of Entry widget
414414
self.master = master
415415
self.title = title
416-
import repr
417-
self.repr = repr.Repr()
416+
import reprlib
417+
self.repr = reprlib.Repr()
418418
self.repr.maxstring = 60
419419
self.repr.maxother = 60
420420
self.frame = frame = Frame(master)

Lib/idlelib/ObjectBrowser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from TreeWidget import TreeItem, TreeNode, ScrolledCanvas
1313

14-
from repr import Repr
14+
from reprlib import Repr
1515

1616
myrepr = Repr()
1717
myrepr.maxstring = 100

Lib/pdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import linecache
99
import cmd
1010
import bdb
11-
from repr import Repr
11+
from reprlib import Repr
1212
import os
1313
import re
1414
import pprint

Lib/pydoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class or function within a module or module in a package. If the
5353
# path will be displayed.
5454

5555
import sys, imp, os, re, types, inspect, __builtin__, pkgutil
56-
from repr import Repr
56+
from reprlib import Repr
5757
from string import expandtabs, find, join, lower, split, strip, rfind, rstrip
5858
try:
5959
from collections import deque

0 commit comments

Comments
 (0)