mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Convert print statements to function calls in Tools/.
This commit is contained in:
parent
e5d0e8431f
commit
6afaeb757a
66 changed files with 777 additions and 779 deletions
|
@ -102,7 +102,7 @@ def combine(fname):
|
|||
addr, addr2rc[addr], addr2guts[addr] = m.groups()
|
||||
before += 1
|
||||
else:
|
||||
print '??? skipped:', line
|
||||
print('??? skipped:', line)
|
||||
|
||||
after = 0
|
||||
for line in read(fi, crack, True):
|
||||
|
@ -111,17 +111,17 @@ def combine(fname):
|
|||
assert m
|
||||
addr, rc, guts = m.groups() # guts is type name here
|
||||
if addr not in addr2rc:
|
||||
print '??? new object created while tearing down:', line.rstrip()
|
||||
print('??? new object created while tearing down:', line.rstrip())
|
||||
continue
|
||||
print addr,
|
||||
print(addr, end=' ')
|
||||
if rc == addr2rc[addr]:
|
||||
print '[%s]' % rc,
|
||||
print('[%s]' % rc, end=' ')
|
||||
else:
|
||||
print '[%s->%s]' % (addr2rc[addr], rc),
|
||||
print guts, addr2guts[addr]
|
||||
print('[%s->%s]' % (addr2rc[addr], rc), end=' ')
|
||||
print(guts, addr2guts[addr])
|
||||
|
||||
f.close()
|
||||
print "%d objects before, %d after" % (before, after)
|
||||
print("%d objects before, %d after" % (before, after))
|
||||
|
||||
if __name__ == '__main__':
|
||||
combine(sys.argv[1])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue