<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#330033" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 1/30/2019 8:45 PM, Raymond Hettinger
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:E05ACFC9-890B-44F9-9175-1F6636F264FC@gmail.com">
<blockquote type="cite" style="color: #000000;">
<pre class="moz-quote-pre" wrap="">On Jan 30, 2019, at 3:41 PM, Glenn Linderman <a class="moz-txt-link-rfc2396E" href="mailto:v+python@g.nevcal.com" moz-do-not-send="true"><v+python@g.nevcal.com></a> wrote:
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite" style="color: #000000;">
<pre class="moz-quote-pre" wrap="">Would it be practical to add deprecated methods to regular dict for the OrderedDict reordering methods that raise with an error suggesting "To use this method, convert dict to OrderedDict." (or some better wording).
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">That's an interesting idea. Regular dicts aren't well suited to the reordering operations (like lists, repeated inserts at the front of the sequence wouldn't be performant relative to OrderedDict which uses double-linked lists internally). My instinct is to leave regular dicts alone so that they can focus on their primary task (being good a fast lookups).</pre>
</blockquote>
<br>
My goal was just to give a meaningful error message if someone
misses the implications in What's New, and has code that actually
does expect named_tuple.as_dict to have the ordering operations.<br>
<br>
The added, deprecated methods could be removed after a couple of
versions.<br>
</body>
</html>