diff options
author | Guido van Rossum <guido@python.org> | 2007-08-29 23:37:34 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-29 23:37:34 (GMT) |
commit | ba1fffac8653331408d60d6a66af2c0cae94381f (patch) | |
tree | 9b54baaaafd25afa3c5be8b5054f34e62986dc8e /Tools/scripts | |
parent | 3add4d78ff9f5de02e2c0de09efe9a9b5317539f (diff) | |
download | cpython-ba1fffac8653331408d60d6a66af2c0cae94381f.zip cpython-ba1fffac8653331408d60d6a66af2c0cae94381f.tar.gz cpython-ba1fffac8653331408d60d6a66af2c0cae94381f.tar.bz2 |
Make it work with Py3k.
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-x | Tools/scripts/dutree.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/scripts/dutree.py b/Tools/scripts/dutree.py index c51f105..dbf4f1a 100755 --- a/Tools/scripts/dutree.py +++ b/Tools/scripts/dutree.py @@ -25,7 +25,7 @@ def main(): def store(size, comps, total, d): if comps == []: return size, d - if not d.has_key(comps[0]): + if comps[0] not in d: d[comps[0]] = None, {} t1, d1 = d[comps[0]] d[comps[0]] = store(size, comps[1:], t1, d1) @@ -53,7 +53,7 @@ def show(total, d, prefix): else: print(prefix + repr(tsub).rjust(width) + ' ' + key) psub = prefix + ' '*(width-1) + '|' + ' '*(len(key)+1) - if d.has_key(key): + if key in d: show(tsub, d[key][1], psub) if __name__ == '__main__': |