diff options
author | Georg Brandl <georg@python.org> | 2008-05-16 15:23:30 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-16 15:23:30 +0000 |
commit | 4fbfa867994f444c899f0e340f8f909d6cc6d919 (patch) | |
tree | acb7958f1b21a0f3298839060112c1ecf3544e2b /Tools/scripts/h2py.py | |
parent | 9484413bf26e00d89b1210c810f7e52fe155dd63 (diff) | |
download | cpython-4fbfa867994f444c899f0e340f8f909d6cc6d919.tar.gz |
Ran 2to3 over scripts directory.
Diffstat (limited to 'Tools/scripts/h2py.py')
-rwxr-xr-x | Tools/scripts/h2py.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py index 58acb82895..19995b9f25 100755 --- a/Tools/scripts/h2py.py +++ b/Tools/scripts/h2py.py @@ -101,7 +101,7 @@ def pytify(body): m = p_hex.search(body, start) if not m: break s,e = m.span() - val = long(body[slice(*m.span(1))], 16) + val = int(body[slice(*m.span(1))], 16) if val > sys.maxsize: val -= UMAX body = body[:s] + "(" + str(val) + ")" + body[e:] @@ -150,9 +150,9 @@ def process(fp, outfp, env = {}): regs = match.regs a, b = regs[1] filename = line[a:b] - if importable.has_key(filename): + if filename in importable: outfp.write('from %s import *\n' % importable[filename]) - elif not filedict.has_key(filename): + elif filename not in filedict: filedict[filename] = None inclfp = None for dir in searchdirs: |