STINNER Victor added the comment:

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.

----------
nosy: +haypo
Added file: http://bugs.python.org/file46532/hack_dict.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29431>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to