Skip to content

Commit f8818a0

Browse files
author
guido.van.rossum
committed
Make it work with Py3k.
git-svn-id: http://svn.python.org/projects/python/branches/py3k@57687 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 36a5cf3 commit f8818a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Tools/scripts/dutree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def main():
2525
def store(size, comps, total, d):
2626
if comps == []:
2727
return size, d
28-
if not d.has_key(comps[0]):
28+
if comps[0] not in d:
2929
d[comps[0]] = None, {}
3030
t1, d1 = d[comps[0]]
3131
d[comps[0]] = store(size, comps[1:], t1, d1)
@@ -53,7 +53,7 @@ def show(total, d, prefix):
5353
else:
5454
print(prefix + repr(tsub).rjust(width) + ' ' + key)
5555
psub = prefix + ' '*(width-1) + '|' + ' '*(len(key)+1)
56-
if d.has_key(key):
56+
if key in d:
5757
show(tsub, d[key][1], psub)
5858

5959
if __name__ == '__main__':

0 commit comments

Comments
 (0)