<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">On Thu, 31 Jan 2019 at 15:46, Raymond Hettinger <<a href="mailto:raymond.hettinger@gmail.com">raymond.hettinger@gmail.com</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> 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).<br>
<br>
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).<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Alternatively, would it be viable to make OrderedDict work in a way that so long as you don't use any reordering operations it's essentially just a very thin layer on top of a dict, but if you do use any reordering operations, it adds in the additional heavyweight structure required to support that?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I'm pretty sure something similar has been considered before, but thought I should bring it up in the context of this discussion (if only to have to shot down).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Tim Delaney</div></div></div>