This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients gvanrossum, ncoghlan, njs
Date 2018-01-28.04:48:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The current oddity where the names will always appear in the reverse of declaration order comes from a C level loop in the frame object's "map_to_dict" helper function that loops in reverse [1]:

    for (j = nmap; --j >= 0; ) {

While I haven't tried reversing that yet, I haven't found anything to indicate that it *needs* to be a reverse iteration - it looks like Guido just wrote it that way back in 1994 [2], and everyone that touched the code since then preserved the original iteration order since they didn't have a compelling reason to change it.

Date User Action Args
2018-01-28 04:48:11ncoghlansetrecipients: + ncoghlan, gvanrossum, njs
2018-01-28 04:48:11ncoghlansetmessageid: <>
2018-01-28 04:48:11ncoghlanlinkissue32690 messages
2018-01-28 04:48:10ncoghlancreate