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 vstinner
Recipients lamby, methane, r.david.murray, rhettinger, vstinner
Date 2017-02-05.23:58:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486339090.24.0.434336545756.issue29431@psf.upfronthosting.co.za>
In-reply-to
Content
While the use case makes sense, test if an application relies on the dictionary iterating order, I'm not sure that adding an option to change the order.

For me, it's a rare and very specific use case, whereas your option is public and "too easy" to find and use. For example, what if a developer decides that its application now requires this option to run?

Moreover, your code changes performance critical code. I don't want to get a slowdown here for rare use case, since we spent a lot of time to optimize these functions!

I suggest you to try to implement your feature in a dict subtype in a third party module, and try to monkey-patch applications to use your type. Attached hack_dict.py is an example, but it only handles code explicitly calling the "dict()" type to create a dictionray.

Another option for you is to maintain your downstream CPython patch, sorry.
History
Date User Action Args
2017-02-05 23:58:10vstinnersetrecipients: + vstinner, rhettinger, r.david.murray, methane, lamby
2017-02-05 23:58:10vstinnersetmessageid: <1486339090.24.0.434336545756.issue29431@psf.upfronthosting.co.za>
2017-02-05 23:58:10vstinnerlinkissue29431 messages
2017-02-05 23:58:09vstinnercreate