Author: Raffael Tfirst <raffael.tfi...@gmail.com>
Branch: py3.5
Changeset: r86452:36436e3e01af
Date: 2016-08-23 17:42 +0200
http://bitbucket.org/pypy/pypy/changeset/36436e3e01af/

Log:    Describe key-value reverse order bug for dicts

diff --git a/pypy/interpreter/astcompiler/codegen.py 
b/pypy/interpreter/astcompiler/codegen.py
--- a/pypy/interpreter/astcompiler/codegen.py
+++ b/pypy/interpreter/astcompiler/codegen.py
@@ -1246,8 +1246,14 @@
                     d.values[i].walkabout(self)
                     containers += 1
                 else:
+                    # TODO: key.walkabout has to be called before 
d.values.walkabout
+                    # that would fix the error "keywords must be strings"
+                    # for some reason the keys and values seem to be in 
reverse order
+                    # in some cases, so another error has to be fixed in order 
for
+                    # this to work, otherwise it breaks everything
+                    # after fix: remove dirty fixes in pyopcode
                     d.values[i].walkabout(self)
-                    d.keys[i].walkabout(self)
+                    key.walkabout(self)
                     elements += 1
         if elements or containers == 0:
             self.emit_op_arg(ops.BUILD_MAP, elements)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to