[Python-checkins] benchmarks: #15834: Make 2to3 so it can actually be proper translated.
brett.cannon
python-checkins at python.org
Fri May 3 19:07:30 CEST 2013
http://hg.python.org/benchmarks/rev/66f168b468c3
changeset: 203:66f168b468c3
user: Brett Cannon <brett at python.org>
date: Fri May 03 13:03:51 2013 -0400
summary:
#15834: Make 2to3 so it can actually be proper translated.
Error only showed itself when you didn't run a fast pass for the
benchmark.
files:
lib/2to3/lib2to3/fixes/fix_operator.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/2to3/lib2to3/fixes/fix_operator.py b/lib/2to3/lib2to3/fixes/fix_operator.py
--- a/lib/2to3/lib2to3/fixes/fix_operator.py
+++ b/lib/2to3/lib2to3/fixes/fix_operator.py
@@ -85,7 +85,9 @@
return Call(Name(u"isinstance"), args, prefix=node.prefix)
def _check_method(self, node, results):
- method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
+ # Issue #15834: don't encode to ASCII as that breaks in translation to
+ # Python 3.
+ method = getattr(self, "_" + str(results["method"][0].value))
if callable(method):
if "module" in results:
return method
--
Repository URL: http://hg.python.org/benchmarks
More information about the Python-checkins
mailing list