New submission from Ezio Melotti: http://docs.python.org/2/reference/expressions.html#evaluation-order says that the dicts are evaluated in this order: {expr1: expr2, expr3: expr4}
however each value is evaluated before the respective key: def f(x): print(x) return x {f('k1'): f('v1'), f('k2'): f('v2')} v1 k1 v2 k2 {'k1': 'v1', 'k2': 'v2'} ---------- assignee: ezio.melotti components: Documentation messages: 178127 nosy: chris.jerdonek, ezio.melotti priority: normal severity: normal stage: needs patch status: open title: "Evaluation order" doc section is wrong about dicts type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16777> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com