mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Ran 2to3 over scripts directory.
This commit is contained in:
parent
d11ae5d6ec
commit
8efadf5d66
19 changed files with 74 additions and 86 deletions
|
@ -92,7 +92,7 @@ def process(filename, table):
|
|||
# Compute closure (this is in fact totally general)
|
||||
#
|
||||
def closure(table):
|
||||
modules = table.keys()
|
||||
modules = list(table.keys())
|
||||
#
|
||||
# Initialize reach with a copy of table
|
||||
#
|
||||
|
@ -135,7 +135,7 @@ def inverse(table):
|
|||
# If there is no list for the key yet, it is created.
|
||||
#
|
||||
def store(dict, key, item):
|
||||
if dict.has_key(key):
|
||||
if key in dict:
|
||||
dict[key].append(item)
|
||||
else:
|
||||
dict[key] = [item]
|
||||
|
@ -144,13 +144,11 @@ def store(dict, key, item):
|
|||
# Tabulate results neatly
|
||||
#
|
||||
def printresults(table):
|
||||
modules = table.keys()
|
||||
modules = sorted(table.keys())
|
||||
maxlen = 0
|
||||
for mod in modules: maxlen = max(maxlen, len(mod))
|
||||
modules.sort()
|
||||
for mod in modules:
|
||||
list = table[mod]
|
||||
list.sort()
|
||||
list = sorted(table[mod])
|
||||
print(mod.ljust(maxlen), ':', end=' ')
|
||||
if mod in list:
|
||||
print('(*)', end=' ')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue