# HG changeset patch # User Augie Fackler # Date 2015-04-12 19:34:17 # Node ID 1db2127d23733b62d9cd70c670148bc27f1a22d2 # Parent 0adc22a0b6b3b921cfa373db3d29dec91a398f6f heredoctest: 2to3 -w -f numliterals -f except -f print tests/heredoctest.py diff --git a/tests/heredoctest.py b/tests/heredoctest.py --- a/tests/heredoctest.py +++ b/tests/heredoctest.py @@ -5,7 +5,7 @@ lines = sys.stdin.readlines() while lines: l = lines.pop(0) if l.startswith('SALT'): - print l[:-1] + print(l[:-1]) elif l.startswith('>>> '): snippet = l[4:] while lines and lines[0].startswith('... '): @@ -13,6 +13,6 @@ while lines: snippet += l[4:] c = compile(snippet, '', 'single') try: - exec c in globalvars - except Exception, inst: - print repr(inst) + exec(c, globalvars) + except Exception as inst: + print(repr(inst))