From 8efadf5d6613e76dfc5476f58adb9a2135173129 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 16 May 2008 15:23:30 +0000 Subject: Ran 2to3 over scripts directory. --- Tools/scripts/h2py.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Tools/scripts/h2py.py') 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: -- cgit v1.2.1