mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
More 2to3 fixes in the Tools directory. Fixes #2893.
This commit is contained in:
parent
acbca71ea7
commit
bf82e374ee
38 changed files with 1999 additions and 2032 deletions
|
@ -45,18 +45,14 @@ def parse(filename):
|
|||
return data
|
||||
|
||||
def pprint(data):
|
||||
|
||||
items = data.items()
|
||||
items.sort()
|
||||
for k,v in items:
|
||||
items = sorted(data.items())
|
||||
for k, v in items:
|
||||
print(' %-40s%r,' % ('%r:' % k, v))
|
||||
|
||||
def print_differences(data, olddata):
|
||||
|
||||
items = olddata.items()
|
||||
items.sort()
|
||||
items = sorted(olddata.items())
|
||||
for k, v in items:
|
||||
if not data.has_key(k):
|
||||
if k not in data:
|
||||
print('# removed %r' % k)
|
||||
elif olddata[k] != data[k]:
|
||||
print('# updated %r -> %r to %r' % \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue