[issue32690] Return function locals() in order of creation?

Raymond Hettinger report at bugs.python.org
Sun Jan 28 17:00:27 EST 2018


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

If you guys think the old code is better in some way, feel free to revert the backport :-)

I'm -0 on undoing the backpport.  ISTM that of all of changes to 3.6, this is one of the safest and it has minor benefits of removing a small irritant and keeping the code in-sync.  IIRC, 3.6 dict order is only assured for CPython but not for the language spec as a whole, so this is arguably a CPython buglet or least a surprising and unexpected behavior.  

While my instincts say forward-is-better-than-scrambled, I don't care much either way.  The only way it affects me is that as an educator, the reversed order is a unnecessary distraction from live demos that show the locals dict.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32690>
_______________________________________


More information about the Python-bugs-list mailing list