[Python-checkins] python/dist/src/Lib BaseHTTPServer.py, 1.28,
1.29 Bastion.py, 1.7, 1.8 CGIHTTPServer.py, 1.32, 1.33 ConfigParser.py, 1.61,
1.62 HTMLParser.py, 1.12, 1.13 StringIO.py, 1.32, 1.33 aifc.py, 1.42,
1.43 atexit.py, 1.6, 1.7 base64.py, 1.15, 1.16 bdb.py, 1.42, 1.43 binhex.py,
1.22, 1.23 calendar.py, 1.32, 1.33 cgi.py, 1.76, 1.77 difflib.py, 1.17,
1.18 dis.py, 1.47, 1.48 doctest.py, 1.32, 1.33 formatter.py, 1.23,
1.24 fpformat.py, 1.9, 1.10 ftplib.py, 1.72, 1.73 gopherlib.py, 1.13,
1.14 gzip.py, 1.39, 1.40 ihooks.py, 1.17, 1.18 imaplib.py, 1.65,
1.66 macurl2path.py, 1.11, 1.12 markupbase.py, 1.8, 1.9 mhlib.py, 1.36,
1.37 mimetools.py, 1.29, 1.30 modulefinder.py, 1.8, 1.9 nntplib.py, 1.36,
1.37 opcode.py, 1.3, 1.4 pdb.py, 1.66, 1.67 pickle.py, 1.156, 1.157 pipes.py,
1.12, 1.13 popen2.py, 1.28, 1.29 poplib.py, 1.22, 1.23 posixfile.py, 1.24,
1.25 pprint.py, 1.28, 1.29 pre.py, 1.15, 1.16 profile.py, 1.50,
1.51 pstats.py, 1.29, 1.30 regsub.py, 1.14, 1.15 repr.py, 1.15,
1.16 rexec.py, 1.48, 1.49 sgmllib.py, 1.46, 1.47 shlex.py, 1.22,
1.23 site.py, 1.55, 1.56 smtplib.py, !
1.63, 1.64 stringold.py, 1.47, 1.48 sunaudio.py, 1.7, 1.8 tabnanny.py, 1.21,
1.22 telnetlib.py, 1.23, 1.24 toaiff.py, 1.14, 1.15 trace.py, 1.16,
1.17 unittest.py, 1.33, 1.34 urllib.py, 1.159, 1.160 warnings.py, 1.21,
1.22 wave.py, 1.16, 1.17 xdrlib.py, 1.15, 1.16 xmllib.py, 1.31, 1.32
doerwalter at users.sourceforge.net
doerwalter at users.sourceforge.net
Thu Feb 12 12:35:46 EST 2004
- Previous message: [Python-checkins] python/dist/src/Lib/idlelib ColorDelegator.py,
1.11, 1.12 EditorWindow.py, 1.54, 1.55 FileList.py, 1.6,
1.7 GrepDialog.py, 1.4, 1.5 ObjectBrowser.py, 1.4,
1.5 ParenMatch.py, 1.7, 1.8 PyShell.py, 1.85,
1.86 RemoteDebugger.py, 1.10, 1.11 ScriptBinding.py, 1.26,
1.27 TreeWidget.py, 1.7, 1.8 UndoDelegator.py, 1.4,
1.5 WidgetRedirector.py, 1.3, 1.4 aboutDialog.py, 1.14,
1.15 configDialog.py, 1.55, 1.56 configHandler.py, 1.32,
1.33 rpc.py, 1.28, 1.29 textView.py, 1.4, 1.5
- Next message: [Python-checkins]
python/dist/src/Doc/whatsnew whatsnew24.tex, 1.30, 1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21620/Lib
Modified Files:
BaseHTTPServer.py Bastion.py CGIHTTPServer.py ConfigParser.py
HTMLParser.py StringIO.py aifc.py atexit.py base64.py bdb.py
binhex.py calendar.py cgi.py difflib.py dis.py doctest.py
formatter.py fpformat.py ftplib.py gopherlib.py gzip.py
ihooks.py imaplib.py macurl2path.py markupbase.py mhlib.py
mimetools.py modulefinder.py nntplib.py opcode.py pdb.py
pickle.py pipes.py popen2.py poplib.py posixfile.py pprint.py
pre.py profile.py pstats.py regsub.py repr.py rexec.py
sgmllib.py shlex.py site.py smtplib.py stringold.py
sunaudio.py tabnanny.py telnetlib.py toaiff.py trace.py
unittest.py urllib.py warnings.py wave.py xdrlib.py xmllib.py
Log Message:
Replace backticks with repr() or "%r"
>From SF patch #852334.
Index: BaseHTTPServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/BaseHTTPServer.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** BaseHTTPServer.py 9 Aug 2003 05:01:41 -0000 1.28
--- BaseHTTPServer.py 12 Feb 2004 17:35:05 -0000 1.29
***************
*** 239,243 ****
[command, path, version] = words
if version[:5] != 'HTTP/':
! self.send_error(400, "Bad request version (%s)" % `version`)
return False
try:
--- 239,243 ----
[command, path, version] = words
if version[:5] != 'HTTP/':
! self.send_error(400, "Bad request version (%r)" % version)
return False
try:
***************
*** 254,258 ****
version_number = int(version_number[0]), int(version_number[1])
except (ValueError, IndexError):
! self.send_error(400, "Bad request version (%s)" % `version`)
return False
if version_number >= (1, 1) and self.protocol_version >= "HTTP/1.1":
--- 254,258 ----
version_number = int(version_number[0]), int(version_number[1])
except (ValueError, IndexError):
! self.send_error(400, "Bad request version (%r)" % version)
return False
if version_number >= (1, 1) and self.protocol_version >= "HTTP/1.1":
***************
*** 267,276 ****
if command != 'GET':
self.send_error(400,
! "Bad HTTP/0.9 request type (%s)" % `command`)
return False
elif not words:
return False
else:
! self.send_error(400, "Bad request syntax (%s)" % `requestline`)
return False
self.command, self.path, self.request_version = command, path, version
--- 267,276 ----
if command != 'GET':
self.send_error(400,
! "Bad HTTP/0.9 request type (%r)" % command)
return False
elif not words:
return False
else:
! self.send_error(400, "Bad request syntax (%r)" % requestline)
return False
self.command, self.path, self.request_version = command, path, version
***************
*** 303,307 ****
mname = 'do_' + self.command
if not hasattr(self, mname):
! self.send_error(501, "Unsupported method (%s)" % `self.command`)
return
method = getattr(self, mname)
--- 303,307 ----
mname = 'do_' + self.command
if not hasattr(self, mname):
! self.send_error(501, "Unsupported method (%r)" % self.command)
return
method = getattr(self, mname)
Index: Bastion.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/Bastion.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Bastion.py 6 Jan 2003 15:43:34 -0000 1.7
--- Bastion.py 12 Feb 2004 17:35:05 -0000 1.8
***************
*** 125,129 ****
if name is None:
! name = `object`
return bastionclass(get2, name)
--- 125,129 ----
if name is None:
! name = repr(object)
return bastionclass(get2, name)
Index: CGIHTTPServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/CGIHTTPServer.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** CGIHTTPServer.py 14 Jul 2003 06:56:32 -0000 1.32
--- CGIHTTPServer.py 12 Feb 2004 17:35:05 -0000 1.33
***************
*** 118,136 ****
scriptfile = self.translate_path(scriptname)
if not os.path.exists(scriptfile):
! self.send_error(404, "No such CGI script (%s)" % `scriptname`)
return
if not os.path.isfile(scriptfile):
! self.send_error(403, "CGI script is not a plain file (%s)" %
! `scriptname`)
return
ispy = self.is_python(scriptname)
if not ispy:
if not (self.have_fork or self.have_popen2 or self.have_popen3):
! self.send_error(403, "CGI script is not a Python script (%s)" %
! `scriptname`)
return
if not self.is_executable(scriptfile):
! self.send_error(403, "CGI script is not executable (%s)" %
! `scriptname`)
return
--- 118,136 ----
scriptfile = self.translate_path(scriptname)
if not os.path.exists(scriptfile):
! self.send_error(404, "No such CGI script (%r)" % scriptname)
return
if not os.path.isfile(scriptfile):
! self.send_error(403, "CGI script is not a plain file (%r)" %
! scriptname)
return
ispy = self.is_python(scriptname)
if not ispy:
if not (self.have_fork or self.have_popen2 or self.have_popen3):
! self.send_error(403, "CGI script is not a Python script (%r)" %
! scriptname)
return
if not self.is_executable(scriptfile):
! self.send_error(403, "CGI script is not executable (%r)" %
! scriptname)
return
Index: ConfigParser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** ConfigParser.py 21 Oct 2003 16:45:00 -0000 1.61
--- ConfigParser.py 12 Feb 2004 17:35:05 -0000 1.62
***************
*** 119,123 ****
def __init__(self, section):
! Error.__init__(self, 'No section: ' + `section`)
self.section = section
--- 119,123 ----
def __init__(self, section):
! Error.__init__(self, 'No section: %r' % (section,))
self.section = section
***************
*** 192,196 ****
Error.__init__(
self,
! 'File contains no section headers.\nfile: %s, line: %d\n%s' %
(filename, lineno, line))
self.filename = filename
--- 192,196 ----
Error.__init__(
self,
! 'File contains no section headers.\nfile: %s, line: %d\n%r' %
(filename, lineno, line))
self.filename = filename
***************
*** 454,458 ****
# no section header in the file?
elif cursect is None:
! raise MissingSectionHeaderError(fpname, lineno, `line`)
# an option line?
else:
--- 454,458 ----
# no section header in the file?
elif cursect is None:
! raise MissingSectionHeaderError(fpname, lineno, line)
# an option line?
else:
***************
*** 479,483 ****
if not e:
e = ParsingError(fpname)
! e.append(lineno, `line`)
# if any parsing errors occurred, raise an exception
if e:
--- 479,483 ----
if not e:
e = ParsingError(fpname)
! e.append(lineno, repr(line))
# if any parsing errors occurred, raise an exception
if e:
***************
*** 614,616 ****
raise InterpolationSyntaxError(
option, section,
! "'%' must be followed by '%' or '(', found: " + `rest`)
--- 614,616 ----
raise InterpolationSyntaxError(
option, section,
! "'%%' must be followed by '%%' or '(', found: %r" % (rest,))
Index: HTMLParser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/HTMLParser.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** HTMLParser.py 14 Mar 2003 16:21:54 -0000 1.12
--- HTMLParser.py 12 Feb 2004 17:35:05 -0000 1.13
***************
*** 273,278 ****
else:
offset = offset + len(self.__starttag_text)
! self.error("junk characters in start tag: %s"
! % `rawdata[k:endpos][:20]`)
if end.endswith('/>'):
# XHTML-style empty tag: <span attr="value" />
--- 273,278 ----
else:
offset = offset + len(self.__starttag_text)
! self.error("junk characters in start tag: %r"
! % (rawdata[k:endpos][:20],))
if end.endswith('/>'):
# XHTML-style empty tag: <span attr="value" />
***************
*** 325,329 ****
match = endtagfind.match(rawdata, i) # </ + tag + >
if not match:
! self.error("bad end tag: %s" % `rawdata[i:j]`)
tag = match.group(1)
self.handle_endtag(tag.lower())
--- 325,329 ----
match = endtagfind.match(rawdata, i) # </ + tag + >
if not match:
! self.error("bad end tag: %r" % (rawdata[i:j],))
tag = match.group(1)
self.handle_endtag(tag.lower())
***************
*** 369,373 ****
def unknown_decl(self, data):
! self.error("unknown declaration: " + `data`)
# Internal -- helper to remove special character quoting
--- 369,373 ----
def unknown_decl(self, data):
! self.error("unknown declaration: %r" % (data,))
# Internal -- helper to remove special character quoting
Index: StringIO.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/StringIO.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** StringIO.py 18 Jan 2004 20:29:54 -0000 1.32
--- StringIO.py 12 Feb 2004 17:35:05 -0000 1.33
***************
*** 223,230 ****
f.write(lines[1])
f.seek(0)
! print 'First line =', `f.readline()`
print 'Position =', f.tell()
line = f.readline()
! print 'Second line =', `line`
f.seek(-len(line), 1)
line2 = f.read(len(line))
--- 223,230 ----
f.write(lines[1])
f.seek(0)
! print 'First line =', repr(f.readline())
print 'Position =', f.tell()
line = f.readline()
! print 'Second line =', repr(line)
f.seek(-len(line), 1)
line2 = f.read(len(line))
Index: aifc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/aifc.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** aifc.py 12 Aug 2002 22:11:28 -0000 1.42
--- aifc.py 12 Feb 2004 17:35:05 -0000 1.43
***************
*** 393,397 ****
if id == marker[0]:
return marker
! raise Error, 'marker ' + `id` + ' does not exist'
def setpos(self, pos):
--- 393,397 ----
if id == marker[0]:
return marker
! raise Error, 'marker %r does not exist' % (id,)
def setpos(self, pos):
***************
*** 698,702 ****
if id == marker[0]:
return marker
! raise Error, 'marker ' + `id` + ' does not exist'
def getmarkers(self):
--- 698,702 ----
if id == marker[0]:
return marker
! raise Error, 'marker %r does not exist' % (id,)
def getmarkers(self):
Index: atexit.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/atexit.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** atexit.py 27 Feb 2003 20:14:31 -0000 1.6
--- atexit.py 12 Feb 2004 17:35:05 -0000 1.7
***************
*** 41,47 ****
print "running x1"
def x2(n):
! print "running x2(%s)" % `n`
def x3(n, kwd=None):
! print "running x3(%s, kwd=%s)" % (`n`, `kwd`)
register(x1)
--- 41,47 ----
print "running x1"
def x2(n):
! print "running x2(%r)" % (n,)
def x3(n, kwd=None):
! print "running x3(%r, kwd=%r)" % (n, kwd)
register(x1)
Index: base64.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/base64.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** base64.py 7 Jan 2004 22:32:12 -0000 1.15
--- base64.py 12 Feb 2004 17:35:05 -0000 1.16
***************
*** 349,353 ****
s1 = encodestring(s0)
s2 = decodestring(s1)
! print s0, `s1`, s2
--- 349,353 ----
s1 = encodestring(s0)
s2 = decodestring(s1)
! print s0, repr(s1), s2
Index: bdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/bdb.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** bdb.py 27 Feb 2003 20:14:32 -0000 1.42
--- bdb.py 12 Feb 2004 17:35:05 -0000 1.43
***************
*** 53,57 ****
if event == 'exception':
return self.dispatch_exception(frame, arg)
! print 'bdb.Bdb.dispatch: unknown debugging event:', `event`
return self.trace_dispatch
--- 53,57 ----
if event == 'exception':
return self.dispatch_exception(frame, arg)
! print 'bdb.Bdb.dispatch: unknown debugging event:', repr(event)
return self.trace_dispatch
***************
*** 312,316 ****
frame, lineno = frame_lineno
filename = self.canonic(frame.f_code.co_filename)
! s = filename + '(' + `lineno` + ')'
if frame.f_code.co_name:
s = s + frame.f_code.co_name
--- 312,316 ----
frame, lineno = frame_lineno
filename = self.canonic(frame.f_code.co_filename)
! s = '%s(%r)' % (filename, lineno)
if frame.f_code.co_name:
s = s + frame.f_code.co_name
Index: binhex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/binhex.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** binhex.py 4 Sep 2001 19:14:13 -0000 1.22
--- binhex.py 12 Feb 2004 17:35:06 -0000 1.23
***************
*** 230,234 ****
def close_data(self):
if self.dlen != 0:
! raise Error, 'Incorrect data size, diff='+`self.rlen`
self._writecrc()
self.state = _DID_DATA
--- 230,234 ----
def close_data(self):
if self.dlen != 0:
! raise Error, 'Incorrect data size, diff=%r' % (self.rlen,)
self._writecrc()
self.state = _DID_DATA
***************
*** 249,253 ****
if self.rlen != 0:
raise Error, \
! "Incorrect resource-datasize, diff="+`self.rlen`
self._writecrc()
self.ofp.close()
--- 249,253 ----
if self.rlen != 0:
raise Error, \
! "Incorrect resource-datasize, diff=%r" % (self.rlen,)
self._writecrc()
self.ofp.close()
Index: calendar.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/calendar.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** calendar.py 13 Feb 2003 22:58:02 -0000 1.32
--- calendar.py 12 Feb 2004 17:35:06 -0000 1.33
***************
*** 152,158 ****
w = max(2, w)
l = max(1, l)
! s = ((month_name[themonth] + ' ' + `theyear`).center(
! 7 * (w + 1) - 1).rstrip() +
! '\n' * l + weekheader(w).rstrip() + '\n' * l)
for aweek in monthcalendar(theyear, themonth):
s = s + week(aweek, w).rstrip() + '\n' * l
--- 152,158 ----
w = max(2, w)
l = max(1, l)
! s = ("%s %r" % (month_name[themonth], theyear)).center(
! 7 * (w + 1) - 1).rstrip() + \
! '\n' * l + weekheader(w).rstrip() + '\n' * l
for aweek in monthcalendar(theyear, themonth):
s = s + week(aweek, w).rstrip() + '\n' * l
***************
*** 182,186 ****
c = max(2, c)
colwidth = (w + 1) * 7 - 1
! s = `year`.center(colwidth * 3 + c * 2).rstrip() + '\n' * l
header = weekheader(w)
header = format3cstring(header, header, header, colwidth, c).rstrip()
--- 182,186 ----
c = max(2, c)
colwidth = (w + 1) * 7 - 1
! s = repr(year).center(colwidth * 3 + c * 2).rstrip() + '\n' * l
header = weekheader(w)
header = format3cstring(header, header, header, colwidth, c).rstrip()
Index: cgi.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** cgi.py 27 Feb 2003 20:14:32 -0000 1.76
--- cgi.py 12 Feb 2004 17:35:06 -0000 1.77
***************
*** 213,217 ****
if len(nv) != 2:
if strict_parsing:
! raise ValueError, "bad query field: %s" % `name_value`
continue
if len(nv[1]) or keep_blank_values:
--- 213,217 ----
if len(nv) != 2:
if strict_parsing:
! raise ValueError, "bad query field: %r" % (name_value,)
continue
if len(nv[1]) or keep_blank_values:
***************
*** 248,253 ****
boundary = pdict['boundary']
if not valid_boundary(boundary):
! raise ValueError, ('Invalid boundary in multipart form: %s'
! % `boundary`)
nextpart = "--" + boundary
--- 248,253 ----
boundary = pdict['boundary']
if not valid_boundary(boundary):
! raise ValueError, ('Invalid boundary in multipart form: %r'
! % (boundary,))
nextpart = "--" + boundary
***************
*** 362,366 ****
def __repr__(self):
"""Return printable representation."""
! return "MiniFieldStorage(%s, %s)" % (`self.name`, `self.value`)
--- 362,366 ----
def __repr__(self):
"""Return printable representation."""
! return "MiniFieldStorage(%r, %r)" % (self.name, self.value)
***************
*** 523,528 ****
def __repr__(self):
"""Return a printable representation."""
! return "FieldStorage(%s, %s, %s)" % (
! `self.name`, `self.filename`, `self.value`)
def __iter__(self):
--- 523,528 ----
def __repr__(self):
"""Return a printable representation."""
! return "FieldStorage(%r, %r, %r)" % (
! self.name, self.filename, self.value)
def __iter__(self):
***************
*** 633,638 ****
ib = self.innerboundary
if not valid_boundary(ib):
! raise ValueError, ('Invalid boundary in multipart form: %s'
! % `ib`)
self.list = []
klass = self.FieldStorageClass or self.__class__
--- 633,637 ----
ib = self.innerboundary
if not valid_boundary(ib):
! raise ValueError, 'Invalid boundary in multipart form: %r' % (ib,)
self.list = []
klass = self.FieldStorageClass or self.__class__
***************
*** 958,963 ****
print "<DT>" + escape(key) + ":",
value = form[key]
! print "<i>" + escape(`type(value)`) + "</i>"
! print "<DD>" + escape(`value`)
print "</DL>"
print
--- 957,962 ----
print "<DT>" + escape(key) + ":",
value = form[key]
! print "<i>" + escape(repr(type(value))) + "</i>"
! print "<DD>" + escape(repr(value))
print "</DL>"
print
Index: difflib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/difflib.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** difflib.py 16 Oct 2003 05:53:16 -0000 1.17
--- difflib.py 12 Feb 2004 17:35:06 -0000 1.18
***************
*** 690,696 ****
if not n > 0:
! raise ValueError("n must be > 0: " + `n`)
if not 0.0 <= cutoff <= 1.0:
! raise ValueError("cutoff must be in [0.0, 1.0]: " + `cutoff`)
result = []
s = SequenceMatcher()
--- 690,696 ----
if not n > 0:
! raise ValueError("n must be > 0: %r" % (n,))
if not 0.0 <= cutoff <= 1.0:
! raise ValueError("cutoff must be in [0.0, 1.0]: %r" % (cutoff,))
result = []
s = SequenceMatcher()
***************
*** 877,881 ****
g = self._dump(' ', a, alo, ahi)
else:
! raise ValueError, 'unknown tag ' + `tag`
for line in g:
--- 877,881 ----
g = self._dump(' ', a, alo, ahi)
else:
! raise ValueError, 'unknown tag %r' % (tag,)
for line in g:
***************
*** 989,993 ****
btags += ' ' * lb
else:
! raise ValueError, 'unknown tag ' + `tag`
for line in self._qformat(aelt, belt, atags, btags):
yield line
--- 989,993 ----
btags += ' ' * lb
else:
! raise ValueError, 'unknown tag %r' % (tag,)
for line in self._qformat(aelt, belt, atags, btags):
yield line
Index: dis.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dis.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** dis.py 28 Oct 2003 12:17:25 -0000 1.47
--- dis.py 12 Feb 2004 17:35:06 -0000 1.48
***************
*** 81,85 ****
if i in labels: print '>>',
else: print ' ',
! print `i`.rjust(4),
print opname[op].ljust(20),
i = i+1
--- 81,85 ----
if i in labels: print '>>',
else: print ' ',
! print repr(i).rjust(4),
print opname[op].ljust(20),
i = i+1
***************
*** 90,100 ****
if op == EXTENDED_ARG:
extended_arg = oparg*65536L
! print `oparg`.rjust(5),
if op in hasconst:
! print '(' + `co.co_consts[oparg]` + ')',
elif op in hasname:
print '(' + co.co_names[oparg] + ')',
elif op in hasjrel:
! print '(to ' + `i + oparg` + ')',
elif op in haslocal:
print '(' + co.co_varnames[oparg] + ')',
--- 90,100 ----
if op == EXTENDED_ARG:
extended_arg = oparg*65536L
! print repr(oparg).rjust(5),
if op in hasconst:
! print '(' + repr(co.co_consts[oparg]) + ')',
elif op in hasname:
print '(' + co.co_names[oparg] + ')',
elif op in hasjrel:
! print '(to ' + repr(i + oparg) + ')',
elif op in haslocal:
print '(' + co.co_varnames[oparg] + ')',
***************
*** 119,123 ****
if i in labels: print '>>',
else: print ' ',
! print `i`.rjust(4),
print opname[op].ljust(15),
i = i+1
--- 119,123 ----
if i in labels: print '>>',
else: print ' ',
! print repr(i).rjust(4),
print opname[op].ljust(15),
i = i+1
***************
*** 125,132 ****
oparg = ord(code[i]) + ord(code[i+1])*256
i = i+2
! print `oparg`.rjust(5),
if op in hasconst:
if constants:
! print '(' + `constants[oparg]` + ')',
else:
print '(%d)'%oparg,
--- 125,132 ----
oparg = ord(code[i]) + ord(code[i+1])*256
i = i+2
! print repr(oparg).rjust(5),
if op in hasconst:
if constants:
! print '(' + repr(constants[oparg]) + ')',
else:
print '(%d)'%oparg,
***************
*** 137,141 ****
print '(%d)'%oparg,
elif op in hasjrel:
! print '(to ' + `i + oparg` + ')',
elif op in haslocal:
if varnames:
--- 137,141 ----
print '(%d)'%oparg,
elif op in hasjrel:
! print '(to ' + repr(i + oparg) + ')',
elif op in haslocal:
if varnames:
Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** doctest.py 17 Sep 2003 05:50:59 -0000 1.32
--- doctest.py 12 Feb 2004 17:35:06 -0000 1.33
***************
*** 335,340 ****
lineno = i - 1
if line[j] != " ":
! raise ValueError("line " + `lineno` + " of docstring lacks "
! "blank after " + PS1 + ": " + line)
j = j + 1
blanks = m.group(1)
--- 335,340 ----
lineno = i - 1
if line[j] != " ":
! raise ValueError("line %r of docstring lacks blank after %s: %s" %
! (lineno, PS1, line))
j = j + 1
blanks = m.group(1)
***************
*** 349,353 ****
if m.group(1) != blanks:
raise ValueError("inconsistent leading whitespace "
! "in line " + `i` + " of docstring: " + line)
i = i + 1
else:
--- 349,353 ----
if m.group(1) != blanks:
raise ValueError("inconsistent leading whitespace "
! "in line %r of docstring: %s" % (i, line))
i = i + 1
else:
***************
*** 368,372 ****
if line[:nblanks] != blanks:
raise ValueError("inconsistent leading whitespace "
! "in line " + `i` + " of docstring: " + line)
expect.append(line[nblanks:])
i = i + 1
--- 368,372 ----
if line[:nblanks] != blanks:
raise ValueError("inconsistent leading whitespace "
! "in line %r of docstring: %s" % (i, line))
expect.append(line[nblanks:])
i = i + 1
***************
*** 476,480 ****
out("*" * 65 + "\n")
_tag_out(out, ("Failure in example", source))
! out("from line #" + `lineno` + " of " + name + "\n")
if state == FAIL:
_tag_out(out, ("Expected", want or NADA), ("Got", got))
--- 476,480 ----
out("*" * 65 + "\n")
_tag_out(out, ("Failure in example", source))
! out("from line #%r of %s\n" % (lineno, name))
if state == FAIL:
_tag_out(out, ("Expected", want or NADA), ("Got", got))
***************
*** 687,692 ****
raise TypeError("Tester.__init__: must specify mod or globs")
if mod is not None and not _ismodule(mod):
! raise TypeError("Tester.__init__: mod must be a module; " +
! `mod`)
if globs is None:
globs = mod.__dict__
--- 687,691 ----
raise TypeError("Tester.__init__: must specify mod or globs")
if mod is not None and not _ismodule(mod):
! raise TypeError("Tester.__init__: mod must be a module; %r" % (mod,))
if globs is None:
globs = mod.__dict__
***************
*** 776,780 ****
except AttributeError:
raise ValueError("Tester.rundoc: name must be given "
! "when object.__name__ doesn't exist; " + `object`)
if self.verbose:
print "Running", name + ".__doc__"
--- 775,779 ----
except AttributeError:
raise ValueError("Tester.rundoc: name must be given "
! "when object.__name__ doesn't exist; %r" % (object,))
if self.verbose:
print "Running", name + ".__doc__"
***************
*** 894,899 ****
if not hasattr(d, "items"):
! raise TypeError("Tester.rundict: d must support .items(); " +
! `d`)
f = t = 0
# Run the tests by alpha order of names, for consistency in
--- 893,897 ----
if not hasattr(d, "items"):
! raise TypeError("Tester.rundict: d must support .items(); %r" % (d,))
f = t = 0
# Run the tests by alpha order of names, for consistency in
***************
*** 937,941 ****
raise TypeError("Tester.run__test__: values in "
"dict must be strings, functions, methods, "
! "or classes; " + `v`)
failures = failures + f
tries = tries + t
--- 935,939 ----
raise TypeError("Tester.run__test__: values in "
"dict must be strings, functions, methods, "
! "or classes; %r" % (v,))
failures = failures + f
tries = tries + t
***************
*** 1140,1144 ****
if not _ismodule(m):
! raise TypeError("testmod: module required; " + `m`)
if name is None:
name = m.__name__
--- 1138,1142 ----
if not _ismodule(m):
! raise TypeError("testmod: module required; %r" % (m,))
if name is None:
name = m.__name__
***************
*** 1154,1158 ****
if not hasattr(testdict, "items"):
raise TypeError("testmod: module.__test__ must support "
! ".items(); " + `testdict`)
f, t = tester.run__test__(testdict, name + ".__test__")
failures += f
--- 1152,1156 ----
if not hasattr(testdict, "items"):
raise TypeError("testmod: module.__test__ must support "
! ".items(); %r" % (testdict,))
f, t = tester.run__test__(testdict, name + ".__test__")
failures += f
Index: formatter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/formatter.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** formatter.py 27 Feb 2003 20:14:33 -0000 1.23
--- formatter.py 12 Feb 2004 17:35:06 -0000 1.24
***************
*** 326,345 ****
def new_alignment(self, align):
! print "new_alignment(%s)" % `align`
def new_font(self, font):
! print "new_font(%s)" % `font`
def new_margin(self, margin, level):
! print "new_margin(%s, %d)" % (`margin`, level)
def new_spacing(self, spacing):
! print "new_spacing(%s)" % `spacing`
def new_styles(self, styles):
! print "new_styles(%s)" % `styles`
def send_paragraph(self, blankline):
! print "send_paragraph(%s)" % `blankline`
def send_line_break(self):
--- 326,345 ----
def new_alignment(self, align):
! print "new_alignment(%r)" % (align,)
def new_font(self, font):
! print "new_font(%r)" % (font,)
def new_margin(self, margin, level):
! print "new_margin(%r, %d)" % (margin, level)
def new_spacing(self, spacing):
! print "new_spacing(%r)" % (spacing,)
def new_styles(self, styles):
! print "new_styles(%r)" % (styles,)
def send_paragraph(self, blankline):
! print "send_paragraph(%r)" % (blankline,)
def send_line_break(self):
***************
*** 350,360 ****
def send_label_data(self, data):
! print "send_label_data(%s)" % `data`
def send_flowing_data(self, data):
! print "send_flowing_data(%s)" % `data`
def send_literal_data(self, data):
! print "send_literal_data(%s)" % `data`
--- 350,360 ----
def send_label_data(self, data):
! print "send_label_data(%r)" % (data,)
def send_flowing_data(self, data):
! print "send_flowing_data(%r)" % (data,)
def send_literal_data(self, data):
! print "send_literal_data(%r)" % (data,)
Index: fpformat.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/fpformat.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** fpformat.py 20 Jan 2001 23:34:12 -0000 1.9
--- fpformat.py 12 Feb 2004 17:35:06 -0000 1.10
***************
*** 89,93 ****
and at least one digit before.
If digs <= 0, the point is suppressed."""
! if type(x) != type(''): x = `x`
try:
sign, intpart, fraction, expo = extract(x)
--- 89,93 ----
and at least one digit before.
If digs <= 0, the point is suppressed."""
! if type(x) != type(''): x = repr(x)
try:
sign, intpart, fraction, expo = extract(x)
***************
*** 105,109 ****
and exactly one digit before.
If digs is <= 0, one digit is kept and the point is suppressed."""
! if type(x) != type(''): x = `x`
sign, intpart, fraction, expo = extract(x)
if not intpart:
--- 105,109 ----
and exactly one digit before.
If digs is <= 0, one digit is kept and the point is suppressed."""
! if type(x) != type(''): x = repr(x)
sign, intpart, fraction, expo = extract(x)
if not intpart:
***************
*** 127,131 ****
s = sign + intpart
if digs > 0: s = s + '.' + fraction
! e = `abs(expo)`
e = '0'*(3-len(e)) + e
if expo < 0: e = '-' + e
--- 127,131 ----
s = sign + intpart
if digs > 0: s = s + '.' + fraction
! e = repr(abs(expo))
e = '0'*(3-len(e)) + e
if expo < 0: e = '-' + e
Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -d -r1.72 -r1.73
*** ftplib.py 3 Jun 2002 10:41:45 -0000 1.72
--- ftplib.py 12 Feb 2004 17:35:06 -0000 1.73
***************
*** 162,166 ****
i = i-1
s = s[:5] + '*'*(i-5) + s[i:]
! return `s`
# Internal: send one line to the server, appending CRLF
--- 162,166 ----
i = i-1
s = s[:5] + '*'*(i-5) + s[i:]
! return repr(s)
# Internal: send one line to the server, appending CRLF
***************
*** 251,255 ****
'''
hbytes = host.split('.')
! pbytes = [`port/256`, `port%256`]
bytes = hbytes + pbytes
cmd = 'PORT ' + ','.join(bytes)
--- 251,255 ----
'''
hbytes = host.split('.')
! pbytes = [repr(port/256), repr(port%256)]
bytes = hbytes + pbytes
cmd = 'PORT ' + ','.join(bytes)
***************
*** 265,269 ****
if af == 0:
raise error_proto, 'unsupported address family'
! fields = ['', `af`, host, `port`, '']
cmd = 'EPRT ' + '|'.join(fields)
return self.voidcmd(cmd)
--- 265,269 ----
if af == 0:
raise error_proto, 'unsupported address family'
! fields = ['', repr(af), host, repr(port), '']
cmd = 'EPRT ' + '|'.join(fields)
return self.voidcmd(cmd)
***************
*** 398,402 ****
while 1:
line = fp.readline()
! if self.debugging > 2: print '*retr*', `line`
if not line:
break
--- 398,402 ----
while 1:
line = fp.readline()
! if self.debugging > 2: print '*retr*', repr(line)
if not line:
break
Index: gopherlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/gopherlib.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** gopherlib.py 22 Sep 2003 12:43:16 -0000 1.13
--- gopherlib.py 12 Feb 2004 17:35:06 -0000 1.14
***************
*** 48,52 ****
if gtype in _type_to_name_map:
return _type_to_name_map[gtype]
! return 'TYPE=' + `gtype`
# Names for characters and strings
--- 48,52 ----
if gtype in _type_to_name_map:
return _type_to_name_map[gtype]
! return 'TYPE=%r' % (gtype,)
# Names for characters and strings
***************
*** 114,118 ****
parts = line[1:].split(TAB)
if len(parts) < 4:
! print '(Bad line from server:', `line`, ')'
continue
if len(parts) > 4:
--- 114,118 ----
parts = line[1:].split(TAB)
if len(parts) < 4:
! print '(Bad line from server: %r)' % (line,)
continue
if len(parts) > 4:
***************
*** 199,203 ****
else:
data = get_binary(f)
! print 'binary data:', len(data), 'bytes:', `data[:100]`[:40]
# Run the test when run as script
--- 199,203 ----
else:
data = get_binary(f)
! print 'binary data:', len(data), 'bytes:', repr(data[:100])[:40]
# Run the test when run as script
Index: gzip.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/gzip.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** gzip.py 4 Dec 2003 19:28:06 -0000 1.39
--- gzip.py 12 Feb 2004 17:35:06 -0000 1.40
***************
*** 443,447 ****
else:
if arg[-3:] != ".gz":
! print "filename doesn't end in .gz:", `arg`
continue
f = open(arg, "rb")
--- 443,447 ----
else:
if arg[-3:] != ".gz":
! print "filename doesn't end in .gz:", repr(arg)
continue
f = open(arg, "rb")
Index: ihooks.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ihooks.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ihooks.py 20 Oct 2003 14:01:49 -0000 1.17
--- ihooks.py 12 Feb 2004 17:35:06 -0000 1.18
***************
*** 274,279 ****
m = self.hooks.load_package(name, filename, file)
else:
! raise ImportError, "Unrecognized module type (%s) for %s" % \
! (`type`, name)
finally:
if file: file.close()
--- 274,279 ----
m = self.hooks.load_package(name, filename, file)
else:
! raise ImportError, "Unrecognized module type (%r) for %s" % \
! (type, name)
finally:
if file: file.close()
***************
*** 300,305 ****
if initfile: initfile.close()
raise ImportError, \
! "Bad type (%s) for __init__ module in package %s" % (
! `inittype`, name)
path = [filename]
file = initfile
--- 300,305 ----
if initfile: initfile.close()
raise ImportError, \
! "Bad type (%r) for __init__ module in package %s" % (
! inittype, name)
path = [filename]
file = initfile
Index: imaplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/imaplib.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** imaplib.py 10 Nov 2003 06:44:44 -0000 1.65
--- imaplib.py 12 Feb 2004 17:35:06 -0000 1.66
***************
*** 193,197 ****
if __debug__:
if self.debug >= 3:
! self._mesg('CAPABILITIES: %s' % `self.capabilities`)
for version in AllowedVersions:
--- 193,197 ----
if __debug__:
if self.debug >= 3:
! self._mesg('CAPABILITIES: %r' % (self.capabilities,))
for version in AllowedVersions:
***************
*** 973,977 ****
if __debug__:
if self.mo is not None and self.debug >= 5:
! self._mesg("\tmatched r'%s' => %s" % (cre.pattern, `self.mo.groups()`))
return self.mo is not None
--- 973,977 ----
if __debug__:
if self.mo is not None and self.debug >= 5:
! self._mesg("\tmatched r'%s' => %r" % (cre.pattern, self.mo.groups()))
return self.mo is not None
***************
*** 1417,1421 ****
test_seq1 = test_seq1[1:] # Login not needed
M._mesg('PROTOCOL_VERSION = %s' % M.PROTOCOL_VERSION)
! M._mesg('CAPABILITIES = %s' % `M.capabilities`)
for cmd,args in test_seq1:
--- 1417,1421 ----
test_seq1 = test_seq1[1:] # Login not needed
M._mesg('PROTOCOL_VERSION = %s' % M.PROTOCOL_VERSION)
! M._mesg('CAPABILITIES = %r' % (M.capabilities,))
for cmd,args in test_seq1:
Index: macurl2path.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/macurl2path.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** macurl2path.py 9 Feb 2001 09:48:45 -0000 1.11
--- macurl2path.py 12 Feb 2004 17:35:06 -0000 1.12
***************
*** 81,85 ****
"/foo/bar/",
"/"]:
! print `url`, '->', `url2pathname(url)`
for path in ["drive:",
"drive:dir:",
--- 81,85 ----
"/foo/bar/",
"/"]:
! print '%r -> %r' % (url, url2pathname(url))
for path in ["drive:",
"drive:dir:",
***************
*** 90,94 ****
":dir:",
":dir:file"]:
! print `path`, '->', `pathname2url(path)`
if __name__ == '__main__':
--- 90,94 ----
":dir:",
":dir:file"]:
! print '%r -> %r' % (path, pathname2url(path))
if __name__ == '__main__':
Index: markupbase.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/markupbase.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** markupbase.py 24 Apr 2003 16:02:42 -0000 1.8
--- markupbase.py 12 Feb 2004 17:35:06 -0000 1.9
***************
*** 125,129 ****
else:
self.error(
! "unexpected %s char in declaration" % `rawdata[j]`)
if j < 0:
return j
--- 125,129 ----
else:
self.error(
! "unexpected %r char in declaration" % rawdata[j])
if j < 0:
return j
***************
*** 145,149 ****
match= _msmarkedsectionclose.search(rawdata, i+3)
else:
! self.error('unknown status keyword %s in marked section' % `rawdata[i+3:j]`)
if not match:
return -1
--- 145,149 ----
match= _msmarkedsectionclose.search(rawdata, i+3)
else:
! self.error('unknown status keyword %r in marked section' % rawdata[i+3:j])
if not match:
return -1
***************
*** 181,186 ****
if s != "<!":
self.updatepos(declstartpos, j + 1)
! self.error("unexpected char in internal subset (in %s)"
! % `s`)
if (j + 2) == n:
# end of buffer; incomplete
--- 181,185 ----
if s != "<!":
self.updatepos(declstartpos, j + 1)
! self.error("unexpected char in internal subset (in %r)" % s)
if (j + 2) == n:
# end of buffer; incomplete
***************
*** 200,204 ****
self.updatepos(declstartpos, j + 2)
self.error(
! "unknown declaration %s in internal subset" % `name`)
# handle the individual names
meth = getattr(self, "_parse_doctype_" + name)
--- 199,203 ----
self.updatepos(declstartpos, j + 2)
self.error(
! "unknown declaration %r in internal subset" % name)
# handle the individual names
meth = getattr(self, "_parse_doctype_" + name)
***************
*** 231,235 ****
else:
self.updatepos(declstartpos, j)
! self.error("unexpected char %s in internal subset" % `c`)
# end of buffer reached
return -1
--- 230,234 ----
else:
self.updatepos(declstartpos, j)
! self.error("unexpected char %r in internal subset" % c)
# end of buffer reached
return -1
Index: mhlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mhlib.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** mhlib.py 6 Nov 2003 14:06:46 -0000 1.36
--- mhlib.py 12 Feb 2004 17:35:06 -0000 1.37
***************
*** 110,114 ****
def __repr__(self):
"""String representation."""
! return 'MH(%s, %s)' % (`self.path`, `self.profile`)
def error(self, msg, *args):
--- 110,114 ----
def __repr__(self):
"""String representation."""
! return 'MH(%r, %r)' % (self.path, self.profile)
def error(self, msg, *args):
***************
*** 248,252 ****
def __repr__(self):
"""String representation."""
! return 'Folder(%s, %s)' % (`self.mh`, `self.name`)
def error(self, *args):
--- 248,252 ----
def __repr__(self):
"""String representation."""
! return 'Folder(%r, %r)' % (self.mh, self.name)
def error(self, *args):
***************
*** 717,721 ****
parts = []
while mf.next():
! n = str(self.number) + '.' + `1 + len(parts)`
part = SubMessage(self.folder, n, mf)
parts.append(part)
--- 717,721 ----
parts = []
while mf.next():
! n = "%s.%r" % (self.number, 1 + len(parts))
part = SubMessage(self.folder, n, mf)
parts.append(part)
***************
*** 801,806 ****
def __repr__(self):
! return 'IntSet(%s, %s, %s)' % (`self.tostring()`,
! `self.sep`, `self.rng`)
def normalize(self):
--- 801,805 ----
def __repr__(self):
! return 'IntSet(%r, %r, %r)' % (self.tostring(), self.sep, self.rng)
def normalize(self):
***************
*** 818,823 ****
s = ''
for lo, hi in self.pairs:
! if lo == hi: t = `lo`
! else: t = `lo` + self.rng + `hi`
if s: s = s + (self.sep + t)
else: s = t
--- 817,822 ----
s = ''
for lo, hi in self.pairs:
! if lo == hi: t = repr(lo)
! else: t = repr(lo) + self.rng + repr(hi)
if s: s = s + (self.sep + t)
else: s = t
***************
*** 964,968 ****
'@test/test1/test11', '@test/test1/test12',
'@test/test1/test11/test111']
! for t in testfolders: do('mh.makefolder(%s)' % `t`)
do('mh.listsubfolders(\'@test\')')
do('mh.listallsubfolders(\'@test\')')
--- 963,967 ----
'@test/test1/test11', '@test/test1/test12',
'@test/test1/test11/test111']
! for t in testfolders: do('mh.makefolder(%r)' % (t,))
do('mh.listsubfolders(\'@test\')')
do('mh.listallsubfolders(\'@test\')')
***************
*** 976,980 ****
f.putsequences(seqs)
do('f.getsequences()')
! for t in reversed(testfolders): do('mh.deletefolder(%s)' % `t`)
do('mh.getcontext()')
context = mh.getcontext()
--- 975,979 ----
f.putsequences(seqs)
do('f.getsequences()')
! for t in reversed(testfolders): do('mh.deletefolder(%r)' % (t,))
do('mh.getcontext()')
context = mh.getcontext()
***************
*** 987,994 ****
'all']:
try:
! do('f.parsesequence(%s)' % `seq`)
except Error, msg:
print "Error:", msg
! stuff = os.popen("pick %s 2>/dev/null" % `seq`).read()
list = map(int, stuff.split())
print list, "<-- pick"
--- 986,993 ----
'all']:
try:
! do('f.parsesequence(%r)' % (seq,))
except Error, msg:
print "Error:", msg
! stuff = os.popen("pick %r 2>/dev/null" % (seq,)).read()
list = map(int, stuff.split())
print list, "<-- pick"
Index: mimetools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mimetools.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** mimetools.py 15 Jun 2003 22:12:23 -0000 1.29
--- mimetools.py 12 Feb 2004 17:35:06 -0000 1.30
***************
*** 130,138 ****
hostid = socket.gethostbyname(socket.gethostname())
try:
! uid = `os.getuid()`
except AttributeError:
uid = '1'
try:
! pid = `os.getpid()`
except AttributeError:
pid = '1'
--- 130,138 ----
hostid = socket.gethostbyname(socket.gethostname())
try:
! uid = repr(os.getuid())
except AttributeError:
uid = '1'
try:
! pid = repr(os.getpid())
except AttributeError:
pid = '1'
Index: modulefinder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/modulefinder.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** modulefinder.py 14 Nov 2003 10:28:42 -0000 1.8
--- modulefinder.py 12 Feb 2004 17:35:06 -0000 1.9
***************
*** 63,71 ****
def __repr__(self):
! s = "Module(%s" % `self.__name__`
if self.__file__ is not None:
! s = s + ", %s" % `self.__file__`
if self.__path__ is not None:
! s = s + ", %s" % `self.__path__`
s = s + ")"
return s
--- 63,71 ----
def __repr__(self):
! s = "Module(%r" % % (self.__name__,)
if self.__file__ is not None:
! s = s + ", %r" % (self.__file__,)
if self.__path__ is not None:
! s = s + ", %r" % (self.__path__,)
s = s + ")"
return s
***************
*** 565,569 ****
print "path:"
for item in path:
! print " ", `item`
# Create the module finder and turn its crank
--- 565,569 ----
print "path:"
for item in path:
! print " ", repr(item)
# Create the module finder and turn its crank
Index: nntplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/nntplib.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** nntplib.py 19 Apr 2003 18:04:57 -0000 1.36
--- nntplib.py 12 Feb 2004 17:35:06 -0000 1.37
***************
*** 176,180 ****
if it 201, posting is not allowed."""
! if self.debugging: print '*welcome*', `self.welcome`
return self.welcome
--- 176,180 ----
if it 201, posting is not allowed."""
! if self.debugging: print '*welcome*', repr(self.welcome)
return self.welcome
***************
*** 191,200 ****
"""Internal: send one line to the server, appending CRLF."""
line = line + CRLF
! if self.debugging > 1: print '*put*', `line`
self.sock.sendall(line)
def putcmd(self, line):
"""Internal: send one command to the server (through putline())."""
! if self.debugging: print '*cmd*', `line`
self.putline(line)
--- 191,200 ----
"""Internal: send one line to the server, appending CRLF."""
line = line + CRLF
! if self.debugging > 1: print '*put*', repr(line)
self.sock.sendall(line)
def putcmd(self, line):
"""Internal: send one command to the server (through putline())."""
! if self.debugging: print '*cmd*', repr(line)
self.putline(line)
***************
*** 204,208 ****
line = self.file.readline()
if self.debugging > 1:
! print '*get*', `line`
if not line: raise EOFError
if line[-2:] == CRLF: line = line[:-2]
--- 204,208 ----
line = self.file.readline()
if self.debugging > 1:
! print '*get*', repr(line)
if not line: raise EOFError
if line[-2:] == CRLF: line = line[:-2]
***************
*** 214,218 ****
Raise various errors if the response indicates an error."""
resp = self.getline()
! if self.debugging: print '*resp*', `resp`
c = resp[:1]
if c == '4':
--- 214,218 ----
Raise various errors if the response indicates an error."""
resp = self.getline()
! if self.debugging: print '*resp*', repr(resp)
c = resp[:1]
if c == '4':
Index: opcode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/opcode.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** opcode.py 24 Apr 2003 05:45:17 -0000 1.3
--- opcode.py 12 Feb 2004 17:35:06 -0000 1.4
***************
*** 22,26 ****
opmap = {}
opname = [''] * 256
! for op in range(256): opname[op] = '<' + `op` + '>'
del op
--- 22,26 ----
opmap = {}
opname = [''] * 256
! for op in range(256): opname[op] = '<%r>' % (op,)
del op
Index: pdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pdb.py,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** pdb.py 15 Jun 2003 23:26:29 -0000 1.66
--- pdb.py 12 Feb 2004 17:35:06 -0000 1.67
***************
*** 220,224 ****
f = self.lookupmodule(filename)
if not f:
! print '*** ', `filename`,
print 'not found from sys.path'
return
--- 220,224 ----
f = self.lookupmodule(filename)
if not f:
! print '*** ', repr(filename),
print 'not found from sys.path'
return
***************
*** 253,257 ****
if not ok:
print '*** The specified object',
! print `arg`,
print 'is not a function'
print ('or was not found '
--- 253,257 ----
if not ok:
print '*** The specified object',
! print repr(arg),
print 'is not a function'
print ('or was not found '
***************
*** 597,601 ****
exc_type_name = t
else: exc_type_name = t.__name__
! print '***', exc_type_name + ':', `v`
raise
--- 597,601 ----
exc_type_name = t
else: exc_type_name = t.__name__
! print '***', exc_type_name + ':', repr(v)
raise
***************
*** 628,632 ****
first = max(1, int(x) - 5)
except:
! print '*** Error in argument:', `arg`
return
elif self.lineno is None:
--- 628,632 ----
first = max(1, int(x) - 5)
except:
! print '*** Error in argument:', repr(arg)
return
elif self.lineno is None:
***************
*** 645,649 ****
break
else:
! s = `lineno`.rjust(3)
if len(s) < 4: s = s + ' '
if lineno in breaklist: s = s + 'B'
--- 645,649 ----
break
else:
! s = repr(lineno).rjust(3)
if len(s) < 4: s = s + ' '
if lineno in breaklist: s = s + 'B'
***************
*** 666,670 ****
exc_type_name = t
else: exc_type_name = t.__name__
! print '***', exc_type_name + ':', `v`
return
code = None
--- 666,670 ----
exc_type_name = t
else: exc_type_name = t.__name__
! print '***', exc_type_name + ':', repr(v)
return
code = None
***************
*** 1035,1039 ****
mainpyfile = filename = sys.argv[1] # Get script filename
if not os.path.exists(filename):
! print 'Error:', `filename`, 'does not exist'
sys.exit(1)
mainmodule = os.path.basename(filename)
--- 1035,1039 ----
mainpyfile = filename = sys.argv[1] # Get script filename
if not os.path.exists(filename):
! print 'Error:', repr(filename), 'does not exist'
sys.exit(1)
mainmodule = os.path.basename(filename)
***************
*** 1043,1045 ****
sys.path.insert(0, os.path.dirname(filename))
! run('execfile(' + `filename` + ')')
--- 1043,1045 ----
sys.path.insert(0, os.path.dirname(filename))
! run('execfile(%r)' % (filename,))
Index: pickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pickle.py,v
retrieving revision 1.156
retrieving revision 1.157
diff -C2 -d -r1.156 -r1.157
*** pickle.py 29 Jun 2003 16:59:59 -0000 1.156
--- pickle.py 12 Feb 2004 17:35:06 -0000 1.157
***************
*** 262,266 ****
return LONG_BINPUT + pack("<i", i)
! return PUT + `i` + '\n'
# Return a GET (BINGET, LONG_BINGET) opcode string, with argument i.
--- 262,266 ----
return LONG_BINPUT + pack("<i", i)
! return PUT + repr(i) + '\n'
# Return a GET (BINGET, LONG_BINGET) opcode string, with argument i.
***************
*** 272,276 ****
return LONG_BINGET + pack("<i", i)
! return GET + `i` + '\n'
def save(self, obj):
--- 272,276 ----
return LONG_BINGET + pack("<i", i)
! return GET + repr(i) + '\n'
def save(self, obj):
***************
*** 470,474 ****
return
# Text pickle, or int too big to fit in signed 4-byte format.
! self.write(INT + `obj` + '\n')
dispatch[IntType] = save_int
--- 470,474 ----
return
# Text pickle, or int too big to fit in signed 4-byte format.
! self.write(INT + repr(obj) + '\n')
dispatch[IntType] = save_int
***************
*** 482,486 ****
self.write(LONG4 + pack("<i", n) + bytes)
return
! self.write(LONG + `obj` + '\n')
dispatch[LongType] = save_long
--- 482,486 ----
self.write(LONG4 + pack("<i", n) + bytes)
return
! self.write(LONG + repr(obj) + '\n')
dispatch[LongType] = save_long
***************
*** 489,493 ****
self.write(BINFLOAT + pack('>d', obj))
else:
! self.write(FLOAT + `obj` + '\n')
dispatch[FloatType] = save_float
--- 489,493 ----
self.write(BINFLOAT + pack('>d', obj))
else:
! self.write(FLOAT + repr(obj) + '\n')
dispatch[FloatType] = save_float
***************
*** 500,504 ****
self.write(BINSTRING + pack("<i", n) + obj)
else:
! self.write(STRING + `obj` + '\n')
self.memoize(obj)
dispatch[StringType] = save_string
--- 500,504 ----
self.write(BINSTRING + pack("<i", n) + obj)
else:
! self.write(STRING + repr(obj) + '\n')
self.memoize(obj)
dispatch[StringType] = save_string
***************
*** 540,544 ****
self.write(UNICODE + obj + '\n')
else:
! self.write(STRING + `obj` + '\n')
self.memoize(obj)
dispatch[StringType] = save_string
--- 540,544 ----
self.write(UNICODE + obj + '\n')
else:
! self.write(STRING + repr(obj) + '\n')
self.memoize(obj)
dispatch[StringType] = save_string
***************
*** 1174,1183 ****
def load_binget(self):
i = ord(self.read(1))
! self.append(self.memo[`i`])
dispatch[BINGET] = load_binget
def load_long_binget(self):
i = mloads('i' + self.read(4))
! self.append(self.memo[`i`])
dispatch[LONG_BINGET] = load_long_binget
--- 1174,1183 ----
def load_binget(self):
i = ord(self.read(1))
! self.append(self.memo[repr(i)])
dispatch[BINGET] = load_binget
def load_long_binget(self):
i = mloads('i' + self.read(4))
! self.append(self.memo[repr(i)])
dispatch[LONG_BINGET] = load_long_binget
***************
*** 1188,1197 ****
def load_binput(self):
i = ord(self.read(1))
! self.memo[`i`] = self.stack[-1]
dispatch[BINPUT] = load_binput
def load_long_binput(self):
i = mloads('i' + self.read(4))
! self.memo[`i`] = self.stack[-1]
dispatch[LONG_BINPUT] = load_long_binput
--- 1188,1197 ----
def load_binput(self):
i = ord(self.read(1))
! self.memo[repr(i)] = self.stack[-1]
dispatch[BINPUT] = load_binput
def load_long_binput(self):
i = mloads('i' + self.read(4))
! self.memo[repr(i)] = self.stack[-1]
dispatch[LONG_BINPUT] = load_long_binput
Index: pipes.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pipes.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** pipes.py 9 Aug 2002 16:37:33 -0000 1.12
--- pipes.py 12 Feb 2004 17:35:06 -0000 1.13
***************
*** 90,95 ****
def __repr__(self):
! """t.__repr__() implements `t`."""
! return '<Template instance, steps=' + `self.steps` + '>'
def reset(self):
--- 90,95 ----
def __repr__(self):
! """t.__repr__() implements repr(t)."""
! return '<Template instance, steps=%r>' % (self.steps,)
def reset(self):
***************
*** 116,120 ****
if kind not in stepkinds:
raise ValueError, \
! 'Template.append: bad kind ' + `kind`
if kind == SOURCE:
raise ValueError, \
--- 116,120 ----
if kind not in stepkinds:
raise ValueError, \
! 'Template.append: bad kind %r' % (kind,)
if kind == SOURCE:
raise ValueError, \
***************
*** 138,142 ****
if kind not in stepkinds:
raise ValueError, \
! 'Template.prepend: bad kind ' + `kind`
if kind == SINK:
raise ValueError, \
--- 138,142 ----
if kind not in stepkinds:
raise ValueError, \
! 'Template.prepend: bad kind %r' % (kind,)
if kind == SINK:
raise ValueError, \
***************
*** 161,165 ****
return self.open_w(file)
raise ValueError, \
! 'Template.open: rw must be \'r\' or \'w\', not ' + `rw`
def open_r(self, file):
--- 161,165 ----
return self.open_w(file)
raise ValueError, \
! 'Template.open: rw must be \'r\' or \'w\', not %r' % (rw,)
def open_r(self, file):
Index: popen2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/popen2.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** popen2.py 6 Oct 2003 21:34:33 -0000 1.28
--- popen2.py 12 Feb 2004 17:35:06 -0000 1.29
***************
*** 179,183 ****
got = r.read()
if got.strip() != expected:
! raise ValueError("wrote %s read %s" % (`teststr`, `got`))
print "testing popen3..."
try:
--- 179,183 ----
got = r.read()
if got.strip() != expected:
! raise ValueError("wrote %r read %r" % (teststr, got))
print "testing popen3..."
try:
***************
*** 189,196 ****
got = r.read()
if got.strip() != expected:
! raise ValueError("wrote %s read %s" % (`teststr`, `got`))
got = e.read()
if got:
! raise ValueError("unexected %s on stderr" % `got`)
for inst in _active[:]:
inst.wait()
--- 189,196 ----
got = r.read()
if got.strip() != expected:
! raise ValueError("wrote %r read %r" % (teststr, got))
got = e.read()
if got:
! raise ValueError("unexected %r on stderr" % (got,))
for inst in _active[:]:
inst.wait()
Index: poplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/poplib.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** poplib.py 31 Oct 2003 12:52:35 -0000 1.22
--- poplib.py 12 Feb 2004 17:35:06 -0000 1.23
***************
*** 101,105 ****
def _putline(self, line):
! if self._debugging > 1: print '*put*', `line`
self.sock.sendall('%s%s' % (line, CRLF))
--- 101,105 ----
def _putline(self, line):
! if self._debugging > 1: print '*put*', repr(line)
self.sock.sendall('%s%s' % (line, CRLF))
***************
*** 108,112 ****
def _putcmd(self, line):
! if self._debugging: print '*cmd*', `line`
self._putline(line)
--- 108,112 ----
def _putcmd(self, line):
! if self._debugging: print '*cmd*', repr(line)
self._putline(line)
***************
*** 118,122 ****
def _getline(self):
line = self.file.readline()
! if self._debugging > 1: print '*get*', `line`
if not line: raise error_proto('-ERR EOF')
octets = len(line)
--- 118,122 ----
def _getline(self):
line = self.file.readline()
! if self._debugging > 1: print '*get*', repr(line)
if not line: raise error_proto('-ERR EOF')
octets = len(line)
***************
*** 136,140 ****
def _getresp(self):
resp, o = self._getline()
! if self._debugging > 1: print '*resp*', `resp`
c = resp[:1]
if c != '+':
--- 136,140 ----
def _getresp(self):
resp, o = self._getline()
! if self._debugging > 1: print '*resp*', repr(resp)
c = resp[:1]
if c != '+':
***************
*** 210,214 ****
retval = self._shortcmd('STAT')
rets = retval.split()
! if self._debugging: print '*stat*', `rets`
numMessages = int(rets[1])
sizeMessages = int(rets[2])
--- 210,214 ----
retval = self._shortcmd('STAT')
rets = retval.split()
! if self._debugging: print '*stat*', repr(rets)
numMessages = int(rets[1])
sizeMessages = int(rets[2])
***************
*** 376,380 ****
line = match.group(0)
self.buffer = renewline.sub('' ,self.buffer, 1)
! if self._debugging > 1: print '*get*', `line`
octets = len(line)
--- 376,380 ----
line = match.group(0)
self.buffer = renewline.sub('' ,self.buffer, 1)
! if self._debugging > 1: print '*get*', repr(line)
octets = len(line)
***************
*** 386,390 ****
def _putline(self, line):
! if self._debugging > 1: print '*put*', `line`
line += CRLF
bytes = len(line)
--- 386,390 ----
def _putline(self, line):
! if self._debugging > 1: print '*put*', repr(line)
line += CRLF
bytes = len(line)
***************
*** 417,421 ****
for i in range(1, numMsgs + 1):
(header, msg, octets) = a.retr(i)
! print "Message ", `i`, ':'
for line in msg:
print ' ' + line
--- 417,421 ----
for i in range(1, numMsgs + 1):
(header, msg, octets) = a.retr(i)
! print "Message %d:" % i
for line in msg:
print ' ' + line
Index: posixfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/posixfile.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** posixfile.py 24 Oct 2001 22:03:35 -0000 1.24
--- posixfile.py 12 Feb 2004 17:35:06 -0000 1.25
***************
*** 84,88 ****
def fileopen(self, file):
import types
! if `type(file)` != "<type 'file'>":
raise TypeError, 'posixfile.fileopen() arg must be file object'
self._file_ = file
--- 84,88 ----
def fileopen(self, file):
import types
! if repr(type(file)) != "<type 'file'>":
raise TypeError, 'posixfile.fileopen() arg must be file object'
self._file_ = file
Index: pprint.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pprint.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** pprint.py 3 Dec 2003 20:26:05 -0000 1.28
--- pprint.py 12 Feb 2004 17:35:07 -0000 1.29
***************
*** 213,217 ****
if typ is str:
if 'locale' not in _sys.modules:
! return `object`, True, False
if "'" in object and '"' not in object:
closure = '"'
--- 213,217 ----
if typ is str:
if 'locale' not in _sys.modules:
! return repr(object), True, False
if "'" in object and '"' not in object:
closure = '"'
***************
*** 227,231 ****
write(char)
else:
! write(qget(char, `char`[1:-1]))
return ("%s%s%s" % (closure, sio.getvalue(), closure)), True, False
--- 227,231 ----
write(char)
else:
! write(qget(char, repr(char)[1:-1]))
return ("%s%s%s" % (closure, sio.getvalue(), closure)), True, False
***************
*** 289,293 ****
return format % _commajoin(components), readable, recursive
! rep = `object`
return rep, (rep and not rep.startswith('<')), False
--- 289,293 ----
return format % _commajoin(components), readable, recursive
! rep = repr(object)
return rep, (rep and not rep.startswith('<')), False
Index: pre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pre.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** pre.py 20 Oct 2003 14:01:50 -0000 1.15
--- pre.py 12 Feb 2004 17:35:07 -0000 1.16
***************
*** 545,549 ****
g = self.re.groupindex[g]
except (KeyError, TypeError):
! raise IndexError, 'group %s is undefined' % `g`
return self.regs[g][0]
--- 545,549 ----
g = self.re.groupindex[g]
except (KeyError, TypeError):
! raise IndexError, 'group %r is undefined' % (g,)
return self.regs[g][0]
***************
*** 561,565 ****
g = self.re.groupindex[g]
except (KeyError, TypeError):
! raise IndexError, 'group %s is undefined' % `g`
return self.regs[g][1]
--- 561,565 ----
g = self.re.groupindex[g]
except (KeyError, TypeError):
! raise IndexError, 'group %r is undefined' % (g,)
return self.regs[g][1]
***************
*** 577,581 ****
g = self.re.groupindex[g]
except (KeyError, TypeError):
! raise IndexError, 'group %s is undefined' % `g`
return self.regs[g]
--- 577,581 ----
g = self.re.groupindex[g]
except (KeyError, TypeError):
! raise IndexError, 'group %r is undefined' % (g,)
return self.regs[g]
***************
*** 630,636 ****
g = self.re.groupindex[g]
except (KeyError, TypeError):
! raise IndexError, 'group %s is undefined' % `g`
if g >= len(self.regs):
! raise IndexError, 'group %s is undefined' % `g`
a, b = self.regs[g]
if a == -1 or b == -1:
--- 630,636 ----
g = self.re.groupindex[g]
except (KeyError, TypeError):
! raise IndexError, 'group %r is undefined' % (g,)
if g >= len(self.regs):
! raise IndexError, 'group %r is undefined' % (g,)
a, b = self.regs[g]
if a == -1 or b == -1:
Index: profile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/profile.py,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** profile.py 22 Oct 2003 17:22:18 -0000 1.50
--- profile.py 12 Feb 2004 17:35:07 -0000 1.51
***************
*** 412,416 ****
# This method is more useful to profile a single function call.
def runcall(self, func, *args, **kw):
! self.set_cmd(`func`)
sys.setprofile(self.dispatcher)
try:
--- 412,416 ----
# This method is more useful to profile a single function call.
def runcall(self, func, *args, **kw):
! self.set_cmd(repr(func))
sys.setprofile(self.dispatcher)
try:
***************
*** 551,553 ****
sys.path.insert(0, os.path.dirname(filename))
! run('execfile(' + `filename` + ')')
--- 551,553 ----
sys.path.insert(0, os.path.dirname(filename))
! run('execfile(%r)' % (filename,))
Index: pstats.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pstats.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** pstats.py 14 May 2003 14:28:09 -0000 1.29
--- pstats.py 12 Feb 2004 17:35:07 -0000 1.30
***************
*** 118,124 ****
arg.stats = {}
if not self.stats:
! raise TypeError, "Cannot create or construct a " \
! + `self.__class__` \
! + " object from '" + `arg` + "'"
return
--- 118,123 ----
arg.stats = {}
if not self.stats:
! raise TypeError, "Cannot create or construct a %r object from '%r''" % (
! self.__class__, arg)
return
***************
*** 301,307 ****
new_list = list[:count]
if len(list) != len(new_list):
! msg = msg + " List reduced from " + `len(list)` \
! + " to " + `len(new_list)` + \
! " due to restriction <" + `sel` + ">\n"
return new_list, msg
--- 300,305 ----
new_list = list[:count]
if len(list) != len(new_list):
! msg = msg + " List reduced from %r to %r due to restriction <%r>\n" % (
! len(list), len(new_list), sel)
return new_list, msg
***************
*** 393,398 ****
for func in clist:
name = func_std_string(func)
! print indent*name_size + name + '(' \
! + `call_dict[func]`+')', \
f8(self.stats[func][3])
indent = " "
--- 391,395 ----
for func in clist:
name = func_std_string(func)
! print indent*name_size + name + '(%r)' % (call_dict[func],), \
f8(self.stats[func][3])
indent = " "
Index: regsub.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/regsub.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** regsub.py 1 Jun 2002 14:18:46 -0000 1.14
--- regsub.py 12 Feb 2004 17:35:07 -0000 1.15
***************
*** 192,198 ****
if len(fields) != 3:
print 'Sorry, not three fields'
! print 'split:', `fields`
continue
[pat, repl, str] = split(line, delpat)
! print 'sub :', `sub(pat, repl, str)`
! print 'gsub:', `gsub(pat, repl, str)`
--- 192,198 ----
if len(fields) != 3:
print 'Sorry, not three fields'
! print 'split:', repr(fields)
continue
[pat, repl, str] = split(line, delpat)
! print 'sub :', repr(sub(pat, repl, str))
! print 'gsub:', repr(gsub(pat, repl, str))
Index: repr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/repr.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** repr.py 5 Feb 2003 18:29:33 -0000 1.15
--- repr.py 12 Feb 2004 17:35:07 -0000 1.16
***************
*** 3,6 ****
--- 3,8 ----
__all__ = ["Repr","repr"]
+ import __builtin__
+
class Repr:
def __init__(self):
***************
*** 23,27 ****
return getattr(self, 'repr_' + typename)(x, level)
else:
! s = `x`
if len(s) > self.maxother:
i = max(0, (self.maxother-3)//2)
--- 25,29 ----
return getattr(self, 'repr_' + typename)(x, level)
else:
! s = __builtin__.repr(x)
if len(s) > self.maxother:
i = max(0, (self.maxother-3)//2)
***************
*** 82,94 ****
return '{' + s + '}'
def repr_str(self, x, level):
! s = `x[:self.maxstring]`
if len(s) > self.maxstring:
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:]
return s
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)
--- 84,96 ----
return '{' + s + '}'
def repr_str(self, x, level):
! s = __builtin__.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 = s[:i] + '...' + s[len(s)-j:]
return s
def repr_long(self, x, level):
! s = __builtin__.repr(x) # XXX Hope this isn't too slow...
if len(s) > self.maxlong:
i = max(0, (self.maxlong-3)//2)
***************
*** 98,102 ****
def repr_instance(self, x, level):
try:
! s = `x`
# Bugs in x.__repr__() can cause arbitrary
# exceptions -- then make up something
--- 100,104 ----
def repr_instance(self, x, level):
try:
! s = __builtin__.repr(x)
# Bugs in x.__repr__() can cause arbitrary
# exceptions -- then make up something
Index: rexec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/rexec.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** rexec.py 27 Feb 2003 20:14:40 -0000 1.48
--- rexec.py 12 Feb 2004 17:35:07 -0000 1.49
***************
*** 553,557 ****
fp = open(args[0])
except IOError, msg:
! print "%s: can't open file %s" % (sys.argv[0], `args[0]`)
return 1
if fp.isatty():
--- 553,557 ----
fp = open(args[0])
except IOError, msg:
! print "%s: can't open file %r" % (sys.argv[0], args[0])
return 1
if fp.isatty():
Index: sgmllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sgmllib.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** sgmllib.py 20 Sep 2003 10:58:38 -0000 1.46
--- sgmllib.py 12 Feb 2004 17:35:07 -0000 1.47
***************
*** 424,428 ****
def handle_data(self, data):
self.testdata = self.testdata + data
! if len(`self.testdata`) >= 70:
self.flush()
--- 424,428 ----
def handle_data(self, data):
self.testdata = self.testdata + data
! if len(repr(self.testdata)) >= 70:
self.flush()
***************
*** 431,439 ****
if data:
self.testdata = ""
! print 'data:', `data`
def handle_comment(self, data):
self.flush()
! r = `data`
if len(r) > 68:
r = r[:32] + '...' + r[-32:]
--- 431,439 ----
if data:
self.testdata = ""
! print 'data:', repr(data)
def handle_comment(self, data):
self.flush()
! r = repr(data)
if len(r) > 68:
r = r[:32] + '...' + r[-32:]
Index: shlex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/shlex.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** shlex.py 29 Jan 2004 06:37:49 -0000 1.22
--- shlex.py 12 Feb 2004 17:35:07 -0000 1.23
***************
*** 60,64 ****
"Push a token onto the stack popped by the get_token method"
if self.debug >= 1:
! print "shlex: pushing token " + `tok`
self.pushback.appendleft(tok)
--- 60,64 ----
"Push a token onto the stack popped by the get_token method"
if self.debug >= 1:
! print "shlex: pushing token " + repr(tok)
self.pushback.appendleft(tok)
***************
*** 91,95 ****
tok = self.pushback.popleft()
if self.debug >= 1:
! print "shlex: popping token " + `tok`
return tok
# No pushback. Get a token.
--- 91,95 ----
tok = self.pushback.popleft()
if self.debug >= 1:
! print "shlex: popping token " + repr(tok)
return tok
# No pushback. Get a token.
***************
*** 113,117 ****
if self.debug >= 1:
if raw != self.eof:
! print "shlex: token=" + `raw`
else:
print "shlex: token=EOF"
--- 113,117 ----
if self.debug >= 1:
if raw != self.eof:
! print "shlex: token=" + repr(raw)
else:
print "shlex: token=EOF"
***************
*** 241,245 ****
if self.debug > 1:
if result:
! print "shlex: raw token=" + `result`
else:
print "shlex: raw token=EOF"
--- 241,245 ----
if self.debug > 1:
if result:
! print "shlex: raw token=" + repr(result)
else:
print "shlex: raw token=EOF"
Index: site.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** site.py 2 Dec 2003 12:27:25 -0000 1.55
--- site.py 12 Feb 2004 17:35:07 -0000 1.56
***************
*** 369,373 ****
print "sys.path = ["
for dir in sys.path:
! print " %s," % `dir`
print "]"
--- 369,373 ----
print "sys.path = ["
for dir in sys.path:
! print " %r," % (dir,)
print "]"
Index: smtplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** smtplib.py 6 Oct 2002 17:55:08 -0000 1.63
--- smtplib.py 12 Feb 2004 17:35:07 -0000 1.64
***************
*** 307,311 ****
def send(self, str):
"""Send `str' to the server."""
! if self.debuglevel > 0: print 'send:', `str`
if self.sock:
try:
--- 307,311 ----
def send(self, str):
"""Send `str' to the server."""
! if self.debuglevel > 0: print 'send:', repr(str)
if self.sock:
try:
***************
*** 346,350 ****
self.close()
raise SMTPServerDisconnected("Connection unexpectedly closed")
! if self.debuglevel > 0: print 'reply:', `line`
resp.append(line[4:].strip())
code=line[:3]
--- 346,350 ----
self.close()
raise SMTPServerDisconnected("Connection unexpectedly closed")
! if self.debuglevel > 0: print 'reply:', repr(line)
resp.append(line[4:].strip())
code=line[:3]
***************
*** 667,671 ****
# self.esmtp_features['7bit']=""
if self.has_extn('size'):
! esmtp_opts.append("size=" + `len(msg)`)
for option in mail_options:
esmtp_opts.append(option)
--- 667,671 ----
# self.esmtp_features['7bit']=""
if self.has_extn('size'):
! esmtp_opts.append("size=%d" % len(msg))
for option in mail_options:
esmtp_opts.append(option)
***************
*** 728,732 ****
break
msg = msg + line
! print "Message length is " + `len(msg)`
server = SMTP('localhost')
--- 728,732 ----
break
msg = msg + line
! print "Message length is %d" % len(msg)
server = SMTP('localhost')
Index: stringold.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/stringold.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** stringold.py 9 Feb 2001 20:18:41 -0000 1.47
--- stringold.py 12 Feb 2004 17:35:07 -0000 1.48
***************
*** 313,317 ****
"""
if type(x) == type(''): s = x
! else: s = `x`
n = len(s)
if n >= width: return s
--- 313,317 ----
"""
if type(x) == type(''): s = x
! else: s = repr(x)
n = len(s)
if n >= width: return s
Index: sunaudio.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sunaudio.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** sunaudio.py 15 Jan 2001 01:36:40 -0000 1.7
--- sunaudio.py 12 Feb 2004 17:35:07 -0000 1.8
***************
*** 42,44 ****
print 'Sample rate:', sample_rate
print 'Channels: ', channels
! print 'Info: ', `info`
--- 42,44 ----
print 'Sample rate:', sample_rate
print 'Channels: ', channels
! print 'Info: ', repr(info)
Index: tabnanny.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tabnanny.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** tabnanny.py 31 May 2002 14:13:04 -0000 1.21
--- tabnanny.py 12 Feb 2004 17:35:07 -0000 1.22
***************
*** 84,88 ****
if os.path.isdir(file) and not os.path.islink(file):
if verbose:
! print "%s: listing directory" % `file`
names = os.listdir(file)
for name in names:
--- 84,88 ----
if os.path.isdir(file) and not os.path.islink(file):
if verbose:
! print "%r: listing directory" % (file,)
names = os.listdir(file)
for name in names:
***************
*** 97,105 ****
f = open(file)
except IOError, msg:
! errprint("%s: I/O Error: %s" % (`file`, str(msg)))
return
if verbose > 1:
! print "checking", `file`, "..."
try:
--- 97,105 ----
f = open(file)
except IOError, msg:
! errprint("%r: I/O Error: %s" % (file, msg))
return
if verbose > 1:
! print "checking %r ..." % file
try:
***************
*** 107,111 ****
except tokenize.TokenError, msg:
! errprint("%s: Token Error: %s" % (`file`, str(msg)))
return
--- 107,111 ----
except tokenize.TokenError, msg:
! errprint("%r: Token Error: %s" % (file, msg))
return
***************
*** 114,129 ****
line = nag.get_line()
if verbose:
! print "%s: *** Line %d: trouble in tab city! ***" % (
! `file`, badline)
! print "offending line:", `line`
print nag.get_msg()
else:
if ' ' in file: file = '"' + file + '"'
if filename_only: print file
! else: print file, badline, `line`
return
if verbose:
! print "%s: Clean bill of health." % `file`
class Whitespace:
--- 114,128 ----
line = nag.get_line()
if verbose:
! print "%r: *** Line %d: trouble in tab city! ***" % (file, badline)
! print "offending line: %r" % (line,)
print nag.get_msg()
else:
if ' ' in file: file = '"' + file + '"'
if filename_only: print file
! else: print file, badline, repr(line)
return
if verbose:
! print "%r: Clean bill of health." % (file,)
class Whitespace:
Index: telnetlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/telnetlib.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** telnetlib.py 27 Feb 2003 20:14:41 -0000 1.23
--- telnetlib.py 12 Feb 2004 17:35:07 -0000 1.24
***************
*** 289,293 ****
if IAC in buffer:
buffer = buffer.replace(IAC, IAC+IAC)
! self.msg("send %s", `buffer`)
self.sock.sendall(buffer)
--- 289,293 ----
if IAC in buffer:
buffer = buffer.replace(IAC, IAC+IAC)
! self.msg("send %r", buffer)
self.sock.sendall(buffer)
***************
*** 520,524 ****
# behavior in process_rawq() above
buf = self.sock.recv(50)
! self.msg("recv %s", `buf`)
self.eof = (not buf)
self.rawq = self.rawq + buf
--- 520,524 ----
# behavior in process_rawq() above
buf = self.sock.recv(50)
! self.msg("recv %r", buf)
self.eof = (not buf)
self.rawq = self.rawq + buf
Index: toaiff.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/toaiff.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** toaiff.py 10 Aug 2002 00:15:36 -0000 1.14
--- toaiff.py 12 Feb 2004 17:35:07 -0000 1.15
***************
*** 93,103 ****
msg = msg[1]
if type(msg) != type(''):
! msg = `msg`
raise error, filename + ': ' + msg
if ftype == 'aiff':
return fname
if ftype is None or not ftype in table:
! raise error, \
! filename + ': unsupported audio file type ' + `ftype`
(fd, temp) = tempfile.mkstemp()
os.close(fd)
--- 93,102 ----
msg = msg[1]
if type(msg) != type(''):
! msg = repr(msg)
raise error, filename + ': ' + msg
if ftype == 'aiff':
return fname
if ftype is None or not ftype in table:
! raise error, '%s: unsupported audio file type %r' % (filename, ftype)
(fd, temp) = tempfile.mkstemp()
os.close(fd)
Index: trace.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/trace.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** trace.py 2 Nov 2003 09:47:05 -0000 1.16
--- trace.py 12 Feb 2004 17:35:07 -0000 1.17
***************
*** 675,679 ****
infile=counts_file, outfile=counts_file)
try:
! t.run('execfile(' + `progname` + ')')
except IOError, err:
_err_exit("Cannot run file %r because: %s" % (sys.argv[0], err))
--- 675,679 ----
infile=counts_file, outfile=counts_file)
try:
! t.run('execfile(%r)' % (progname,))
except IOError, err:
_err_exit("Cannot run file %r because: %s" % (sys.argv[0], err))
Index: unittest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** unittest.py 6 Dec 2003 13:03:13 -0000 1.33
--- unittest.py 12 Feb 2004 17:35:07 -0000 1.34
***************
*** 331,335 ****
if not first == second:
raise self.failureException, \
! (msg or '%s != %s' % (`first`, `second`))
def failIfEqual(self, first, second, msg=None):
--- 331,335 ----
if not first == second:
raise self.failureException, \
! (msg or '%r != %r' % (first, second))
def failIfEqual(self, first, second, msg=None):
***************
*** 339,343 ****
if first == second:
raise self.failureException, \
! (msg or '%s == %s' % (`first`, `second`))
def failUnlessAlmostEqual(self, first, second, places=7, msg=None):
--- 339,343 ----
if first == second:
raise self.failureException, \
! (msg or '%r == %r' % (first, second))
def failUnlessAlmostEqual(self, first, second, places=7, msg=None):
***************
*** 351,355 ****
if round(second-first, places) != 0:
raise self.failureException, \
! (msg or '%s != %s within %s places' % (`first`, `second`, `places` ))
def failIfAlmostEqual(self, first, second, places=7, msg=None):
--- 351,355 ----
if round(second-first, places) != 0:
raise self.failureException, \
! (msg or '%r != %r within %r places' % (first, second, places))
def failIfAlmostEqual(self, first, second, places=7, msg=None):
***************
*** 363,367 ****
if round(second-first, places) == 0:
raise self.failureException, \
! (msg or '%s == %s within %s places' % (`first`, `second`, `places`))
# Synonyms for assertion methods
--- 363,367 ----
if round(second-first, places) == 0:
raise self.failureException, \
! (msg or '%r == %r within %r places' % (first, second, places))
# Synonyms for assertion methods
Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.159
retrieving revision 1.160
diff -C2 -d -r1.159 -r1.160
*** urllib.py 29 Aug 2003 18:12:23 -0000 1.159
--- urllib.py 12 Feb 2004 17:35:07 -0000 1.160
***************
*** 795,800 ****
def __repr__(self):
! return '<%s at %s whose fp = %s>' % (self.__class__.__name__,
! `id(self)`, `self.fp`)
def close(self):
--- 795,800 ----
def __repr__(self):
! return '<%s at %r whose fp = %r>' % (self.__class__.__name__,
! id(self), self.fp)
def close(self):
***************
*** 1408,1414 ****
if uqs != s:
print 'Wrong!'
! print `s`
! print `qs`
! print `uqs`
print round(t1 - t0, 3), 'sec'
--- 1408,1414 ----
if uqs != s:
print 'Wrong!'
! print repr(s)
! print repr(qs)
! print repr(uqs)
print round(t1 - t0, 3), 'sec'
Index: warnings.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/warnings.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** warnings.py 11 Jul 2003 15:37:56 -0000 1.21
--- warnings.py 12 Feb 2004 17:35:07 -0000 1.22
***************
*** 111,116 ****
# Unrecognized actions are errors
raise RuntimeError(
! "Unrecognized action (%s) in warnings.filters:\n %s" %
! (`action`, str(item)))
# Print message and context
showwarning(message, category, filename, lineno)
--- 111,116 ----
# Unrecognized actions are errors
raise RuntimeError(
! "Unrecognized action (%r) in warnings.filters:\n %s" %
! (action, item))
# Print message and context
showwarning(message, category, filename, lineno)
***************
*** 140,144 ****
import re
assert action in ("error", "ignore", "always", "default", "module",
! "once"), "invalid action: %s" % `action`
assert isinstance(message, basestring), "message must be a string"
assert isinstance(category, types.ClassType), "category must be a class"
--- 140,144 ----
import re
assert action in ("error", "ignore", "always", "default", "module",
! "once"), "invalid action: %r" % (action,)
assert isinstance(message, basestring), "message must be a string"
assert isinstance(category, types.ClassType), "category must be a class"
***************
*** 160,164 ****
"""
assert action in ("error", "ignore", "always", "default", "module",
! "once"), "invalid action: %s" % `action`
assert isinstance(lineno, int) and lineno >= 0, \
"lineno must be an int >= 0"
--- 160,164 ----
"""
assert action in ("error", "ignore", "always", "default", "module",
! "once"), "invalid action: %r" % (action,)
assert isinstance(lineno, int) and lineno >= 0, \
"lineno must be an int >= 0"
***************
*** 190,194 ****
parts = arg.split(':')
if len(parts) > 5:
! raise _OptionError("too many fields (max 5): %s" % `arg`)
while len(parts) < 5:
parts.append('')
--- 190,194 ----
parts = arg.split(':')
if len(parts) > 5:
! raise _OptionError("too many fields (max 5): %r" % (arg,))
while len(parts) < 5:
parts.append('')
***************
*** 207,211 ****
raise ValueError
except (ValueError, OverflowError):
! raise _OptionError("invalid lineno %s" % `lineno`)
else:
lineno = 0
--- 207,211 ----
raise ValueError
except (ValueError, OverflowError):
! raise _OptionError("invalid lineno %r" % (lineno,))
else:
lineno = 0
***************
*** 220,224 ****
if a.startswith(action):
return a
! raise _OptionError("invalid action: %s" % `action`)
# Helper for _setoption()
--- 220,224 ----
if a.startswith(action):
return a
! raise _OptionError("invalid action: %r" % (action,))
# Helper for _setoption()
***************
*** 231,235 ****
cat = eval(category)
except NameError:
! raise _OptionError("unknown warning category: %s" % `category`)
else:
i = category.rfind(".")
--- 231,235 ----
cat = eval(category)
except NameError:
! raise _OptionError("unknown warning category: %r" % (category,))
else:
i = category.rfind(".")
***************
*** 239,250 ****
m = __import__(module, None, None, [klass])
except ImportError:
! raise _OptionError("invalid module name: %s" % `module`)
try:
cat = getattr(m, klass)
except AttributeError:
! raise _OptionError("unknown warning category: %s" % `category`)
if (not isinstance(cat, types.ClassType) or
not issubclass(cat, Warning)):
! raise _OptionError("invalid warning category: %s" % `category`)
return cat
--- 239,250 ----
m = __import__(module, None, None, [klass])
except ImportError:
! raise _OptionError("invalid module name: %r" % (module,))
try:
cat = getattr(m, klass)
except AttributeError:
! raise _OptionError("unknown warning category: %r" % (category,))
if (not isinstance(cat, types.ClassType) or
not issubclass(cat, Warning)):
! raise _OptionError("invalid warning category: %r" % (category,))
return cat
Index: wave.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/wave.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** wave.py 4 Sep 2001 19:14:14 -0000 1.16
--- wave.py 12 Feb 2004 17:35:07 -0000 1.17
***************
*** 262,266 ****
self._sampwidth = (sampwidth + 7) // 8
else:
! raise Error, 'unknown format: ' + `wFormatTag`
self._framesize = self._nchannels * self._sampwidth
self._comptype = 'NONE'
--- 262,266 ----
self._sampwidth = (sampwidth + 7) // 8
else:
! raise Error, 'unknown format: %r' % (wFormatTag,)
self._framesize = self._nchannels * self._sampwidth
self._comptype = 'NONE'
Index: xdrlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xdrlib.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** xdrlib.py 27 Feb 2003 20:14:45 -0000 1.15
--- xdrlib.py 12 Feb 2004 17:35:07 -0000 1.16
***************
*** 212,216 ****
if x == 0: break
if x != 1:
! raise ConversionError, '0 or 1 expected, got ' + `x`
item = unpack_item()
list.append(item)
--- 212,216 ----
if x == 0: break
if x != 1:
! raise ConversionError, '0 or 1 expected, got %r' % (x,)
item = unpack_item()
list.append(item)
Index: xmllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xmllib.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** xmllib.py 27 Feb 2003 20:14:45 -0000 1.31
--- xmllib.py 12 Feb 2004 17:35:07 -0000 1.32
***************
*** 818,826 ****
def handle_doctype(self, tag, pubid, syslit, data):
self.flush()
! print 'DOCTYPE:',tag, `data`
def handle_data(self, data):
self.testdata = self.testdata + data
! if len(`self.testdata`) >= 70:
self.flush()
--- 818,826 ----
def handle_doctype(self, tag, pubid, syslit, data):
self.flush()
! print 'DOCTYPE:',tag, repr(data)
def handle_data(self, data):
self.testdata = self.testdata + data
! if len(repr(self.testdata)) >= 70:
self.flush()
***************
*** 829,845 ****
if data:
self.testdata = ""
! print 'data:', `data`
def handle_cdata(self, data):
self.flush()
! print 'cdata:', `data`
def handle_proc(self, name, data):
self.flush()
! print 'processing:',name,`data`
def handle_comment(self, data):
self.flush()
! r = `data`
if len(r) > 68:
r = r[:32] + '...' + r[-32:]
--- 829,845 ----
if data:
self.testdata = ""
! print 'data:', repr(data)
def handle_cdata(self, data):
self.flush()
! print 'cdata:', repr(data)
def handle_proc(self, name, data):
self.flush()
! print 'processing:',name,repr(data)
def handle_comment(self, data):
self.flush()
! r = repr(data)
if len(r) > 68:
r = r[:32] + '...' + r[-32:]
- Previous message: [Python-checkins] python/dist/src/Lib/idlelib ColorDelegator.py,
1.11, 1.12 EditorWindow.py, 1.54, 1.55 FileList.py, 1.6,
1.7 GrepDialog.py, 1.4, 1.5 ObjectBrowser.py, 1.4,
1.5 ParenMatch.py, 1.7, 1.8 PyShell.py, 1.85,
1.86 RemoteDebugger.py, 1.10, 1.11 ScriptBinding.py, 1.26,
1.27 TreeWidget.py, 1.7, 1.8 UndoDelegator.py, 1.4,
1.5 WidgetRedirector.py, 1.3, 1.4 aboutDialog.py, 1.14,
1.15 configDialog.py, 1.55, 1.56 configHandler.py, 1.32,
1.33 rpc.py, 1.28, 1.29 textView.py, 1.4, 1.5
- Next message: [Python-checkins]
python/dist/src/Doc/whatsnew whatsnew24.tex, 1.30, 1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list