mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +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
|
@ -49,7 +49,7 @@ def pprint(data):
|
|||
items = data.items()
|
||||
items.sort()
|
||||
for k,v in items:
|
||||
print ' %-40s%r,' % ('%r:' % k, v)
|
||||
print(' %-40s%r,' % ('%r:' % k, v))
|
||||
|
||||
def print_differences(data, olddata):
|
||||
|
||||
|
@ -57,17 +57,17 @@ def print_differences(data, olddata):
|
|||
items.sort()
|
||||
for k, v in items:
|
||||
if not data.has_key(k):
|
||||
print '# removed %r' % k
|
||||
print('# removed %r' % k)
|
||||
elif olddata[k] != data[k]:
|
||||
print '# updated %r -> %r to %r' % \
|
||||
(k, olddata[k], data[k])
|
||||
print('# updated %r -> %r to %r' % \
|
||||
(k, olddata[k], data[k]))
|
||||
# Additions are not mentioned
|
||||
|
||||
if __name__ == '__main__':
|
||||
data = locale.locale_alias.copy()
|
||||
data.update(parse(LOCALE_ALIAS))
|
||||
print_differences(data, locale.locale_alias)
|
||||
print
|
||||
print 'locale_alias = {'
|
||||
print()
|
||||
print('locale_alias = {')
|
||||
pprint(data)
|
||||
print '}'
|
||||
print('}')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue