mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
Fixing bug
[#448679] Left to right * Python/compile.c (com_dictmaker): Reordered evaluation of dictionaries to follow strict LTR evaluation. * Lib/compiler/pycodegen.py (CodeGenerator.visitDict): Reordered evaluation of dictionaries to follow strict LTR evaluation. * Doc/ref/ref5.tex Documented the general LTR evaluation order idea. * Misc/NEWS Documented change in evaluation order of dictionaries.
This commit is contained in:
parent
c389ec8d55
commit
78429a6aa6
4 changed files with 26 additions and 4 deletions
|
@ -1129,9 +1129,9 @@ class CodeGenerator:
|
|||
self.emit('SET_LINENO', lineno2)
|
||||
lineno = lineno2
|
||||
self.emit('DUP_TOP')
|
||||
self.visit(v)
|
||||
self.emit('ROT_TWO')
|
||||
self.visit(k)
|
||||
self.visit(v)
|
||||
self.emit('ROT_THREE')
|
||||
self.emit('STORE_SUBSCR')
|
||||
|
||||
class NestedScopeMixin:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue