Message288623
I think the current behavior is correct and desirable (as you say, it follows the order that would take place in an assignment, making it easy to roll-up existing for-loop code into a dict comprehension or to unroll and existing comprehension). Also, I think changing the behavior might risk introducing bugs into existing code that may have unconsciously relied on the existing order. My recommendation is to document the current value-first behavior.
For the other issue, 11205, I agree with the discussion there that key-first-value-second makes more sense in the context of literals which are normally evaluated left-to-right. |
|
Date |
User |
Action |
Args |
2017-02-27 09:35:03 | rhettinger | set | recipients:
+ rhettinger, xiang.zhang, Jim Fasarakis-Hilliard, EvKounis |
2017-02-27 09:35:03 | rhettinger | set | messageid: <1488188103.39.0.873813542322.issue29652@psf.upfronthosting.co.za> |
2017-02-27 09:35:03 | rhettinger | link | issue29652 messages |
2017-02-27 09:35:02 | rhettinger | create | |
|