summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/pdeps.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-16 15:23:30 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-16 15:23:30 (GMT)
commit8efadf5d6613e76dfc5476f58adb9a2135173129 (patch)
tree93ea7c3914c65801cd3844aa0ea1304676076940 /Tools/scripts/pdeps.py
parentd11ae5d6ecda1d233af651a360c9f9140992f05d (diff)
downloadcpython-8efadf5d6613e76dfc5476f58adb9a2135173129.zip
cpython-8efadf5d6613e76dfc5476f58adb9a2135173129.tar.gz
cpython-8efadf5d6613e76dfc5476f58adb9a2135173129.tar.bz2
Ran 2to3 over scripts directory.
Diffstat (limited to 'Tools/scripts/pdeps.py')
-rwxr-xr-xTools/scripts/pdeps.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Tools/scripts/pdeps.py b/Tools/scripts/pdeps.py
index 35b4067..5c5a05b 100755
--- a/Tools/scripts/pdeps.py
+++ b/Tools/scripts/pdeps.py
@@ -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=' ')