Issue 16777: "Evaluation order" doc section is wrong about dicts (original) (raw)
Issue16777
Created on 2012-12-25 13:54 by ezio.melotti, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (2) | ||
---|---|---|
msg178127 - (view) | Author: Ezio Melotti (ezio.melotti) * ![]() |
Date: 2012-12-25 13:54 |
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'} | ||
msg178129 - (view) | Author: Ezio Melotti (ezio.melotti) * ![]() |
Date: 2012-12-25 14:41 |
This has already been reported in #11205. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:39 | admin | set | github: 60981 |
2012-12-25 14:41:50 | ezio.melotti | set | status: open -> closedsuperseder: Evaluation order of dictionary display is different from reference manual.messages: + resolution: duplicatestage: needs patch -> resolved |
2012-12-25 13:54:47 | ezio.melotti | create |