summaryrefslogtreecommitdiffstats
path: root/Lib/bdb.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
commitbe19ed77ddb047e02fe94d142181062af6d99dcc (patch)
tree70f214e06554046fcccbadeb78665f25e07ce965 /Lib/bdb.py
parent452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff)
downloadcpython-be19ed77ddb047e02fe94d142181062af6d99dcc.zip
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.gz
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.bz2
Fix most trivially-findable print statements.
There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
Diffstat (limited to 'Lib/bdb.py')
-rw-r--r--Lib/bdb.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/Lib/bdb.py b/Lib/bdb.py
index 11cce42..d49e7e3 100644
--- a/Lib/bdb.py
+++ b/Lib/bdb.py
@@ -58,7 +58,7 @@ class Bdb:
return self.trace_dispatch
if event == 'c_return':
return self.trace_dispatch
- print 'bdb.Bdb.dispatch: unknown debugging event:', repr(event)
+ print('bdb.Bdb.dispatch: unknown debugging event:', repr(event))
return self.trace_dispatch
def dispatch_line(self, frame):
@@ -483,17 +483,17 @@ class Breakpoint:
disp = disp + 'yes '
else:
disp = disp + 'no '
- print >>out, '%-4dbreakpoint %s at %s:%d' % (self.number, disp,
- self.file, self.line)
+ print('%-4dbreakpoint %s at %s:%d' % (self.number, disp,
+ self.file, self.line), file=out)
if self.cond:
- print >>out, '\tstop only if %s' % (self.cond,)
+ print('\tstop only if %s' % (self.cond,), file=out)
if self.ignore:
- print >>out, '\tignore next %d hits' % (self.ignore)
+ print('\tignore next %d hits' % (self.ignore), file=out)
if (self.hits):
if (self.hits > 1): ss = 's'
else: ss = ''
- print >>out, ('\tbreakpoint already hit %d time%s' %
- (self.hits, ss))
+ print(('\tbreakpoint already hit %d time%s' %
+ (self.hits, ss)), file=out)
# -----------end of Breakpoint class----------
@@ -582,27 +582,27 @@ class Tdb(Bdb):
def user_call(self, frame, args):
name = frame.f_code.co_name
if not name: name = '???'
- print '+++ call', name, args
+ print('+++ call', name, args)
def user_line(self, frame):
import linecache
name = frame.f_code.co_name
if not name: name = '???'
fn = self.canonic(frame.f_code.co_filename)
line = linecache.getline(fn, frame.f_lineno)
- print '+++', fn, frame.f_lineno, name, ':', line.strip()
+ print('+++', fn, frame.f_lineno, name, ':', line.strip())
def user_return(self, frame, retval):
- print '+++ return', retval
+ print('+++ return', retval)
def user_exception(self, frame, exc_stuff):
- print '+++ exception', exc_stuff
+ print('+++ exception', exc_stuff)
self.set_continue()
def foo(n):
- print 'foo(', n, ')'
+ print('foo(', n, ')')
x = bar(n*10)
- print 'bar returned', x
+ print('bar returned', x)
def bar(a):
- print 'bar(', a, ')'
+ print('bar(', a, ')')
return a/2
def test():