<div>Hm. Wouldn'tvevery call site be slowed down by checking for that flag?</div><div class="mailbox_signature">—<br>Sent from <a href="https://www.dropbox.com/mailbox">Mailbox</a></div><br><br><div class="gmail_quote"><p>On Sun, May 19, 2013 at 7:42 AM, Nick Coghlan <span dir="ltr"><<a href="mailto:firstname.lastname@example.org" target="_blank">email@example.com</a>></span> wrote:<br></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><p>On Sun, May 19, 2013 at 11:01 PM, Antoine Pitrou <firstname.lastname@example.org> wrote:
<br>> The main use case seems to be the OrderedDict constructor itself.
<br>> Otherwise, I can't think of any situation where I would've wanted it.
<br><br>I've had a couple related to populating other mappings where order
<br>matters, at least from a predictability and readability perspective,
<br>even if it's not strictly required from a standards compliance point
<br>of view (think writing XML attributes, etc).
<br><br>I quite liked the idea of a simple flag attribute on function objects
<br>that the interpreter checked, with a decorator in functools (or even
<br>the builtins) to set it. It's not a particularly elegant solution, but
<br>it would get the job done with minimal performance impact on existing
<br>Nick Coghlan | email@example.com | Brisbane, Australia
<br>Python-Dev mailing list