[Python-Dev] [RFC] Removing pure Python implementation of OrderedDict (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Tue Sep 5 09:22:48 EDT 2017
- Previous message (by thread): [Python-Dev] [RFC] Removing pure Python implementation of OrderedDict
- Next message (by thread): [Python-Dev] [RFC] Removing pure Python implementation of OrderedDict
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.lruget(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.
- Previous message (by thread): [Python-Dev] [RFC] Removing pure Python implementation of OrderedDict
- Next message (by thread): [Python-Dev] [RFC] Removing pure Python implementation of OrderedDict
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]