A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-September/149153.html below:

[Python-Dev] [RFC] Removing pure Python implementation of OrderedDict

[Python-Dev] [RFC] Removing pure Python implementation of OrderedDict [Python-Dev] [RFC] Removing pure Python implementation of OrderedDictAntoine Pitrou solipsis at pitrou.net
Tue Sep 5 09:22:48 EDT 2017
On Tue, 5 Sep 2017 17:38:06 +0900
INADA Naoki <songofacandy at gmail.com> wrote:
> 
> Like that, how about removing OrderedDict Pure Python implementation
> from stdlib and require it to implementation?

I don't like this.  The C version of OrderedDict is probably very hard
to read, while the Python version helps understand the semantics.
Also, when devising a new API, it's much easier to first try it out on
the Python version.

> I'm considering adding `OrderedDict.lru_get(key, default=None)`  which
> atomically lookup key and move the key to end if found.

The Python version needn't have the same atomicity requirements as the
C version.

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4