[Python-Dev] Ordering keyword dicts
Guido van Rossum
gvanrossum at gmail.com
Sun May 19 16:57:22 CEST 2013
More information about the Python-Dev mailing list
Sun May 19 16:57:22 CEST 2013
- Previous message: [Python-Dev] Ordering keyword dicts
- Next message: [Python-Dev] Ordering keyword dicts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hm. Wouldn'tvevery call site be slowed down by checking for that flag? — Sent from Mailbox On Sun, May 19, 2013 at 7:42 AM, Nick Coghlan <ncoghlan at gmail.com> wrote: > On Sun, May 19, 2013 at 11:01 PM, Antoine Pitrou <solipsis at pitrou.net> wrote: >> The main use case seems to be the OrderedDict constructor itself. >> Otherwise, I can't think of any situation where I would've wanted it. > I've had a couple related to populating other mappings where order > matters, at least from a predictability and readability perspective, > even if it's not strictly required from a standards compliance point > of view (think writing XML attributes, etc). > I quite liked the idea of a simple flag attribute on function objects > that the interpreter checked, with a decorator in functools (or even > the builtins) to set it. It's not a particularly elegant solution, but > it would get the job done with minimal performance impact on existing > functions. > Cheers, > Nick. > -- > Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130519/f5b3adea/attachment.html>
- Previous message: [Python-Dev] Ordering keyword dicts
- Next message: [Python-Dev] Ordering keyword dicts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list