Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r52273:abe40b46a9f1
Date: 2012-02-09 12:22 +0100
http://bitbucket.org/pypy/pypy/changeset/abe40b46a9f1/

Log:    co_code is a bytestring, so we don't need ord()

diff --git a/pypy/interpreter/test/test_compiler.py 
b/pypy/interpreter/test/test_compiler.py
--- a/pypy/interpreter/test/test_compiler.py
+++ b/pypy/interpreter/test/test_compiler.py
@@ -782,7 +782,7 @@
         co = compile("def f(): return None", "<test>", "exec").co_consts[0]
         assert "None" not in co.co_names
         co = co.co_code
-        op = ord(co[0]) + (ord(co[1]) << 8)
+        op = co[0] + (co[1] << 8)
         assert op == opcode.opmap["LOAD_CONST"]
 
     def test_tuple_constants(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to