[Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

Guido van Rossum guido at python.org
Mon Mar 2 22:46:10 CET 2009


On Mon, Mar 2, 2009 at 1:28 PM, Georg Brandl <g.brandl at gmx.net> wrote:
> Benjamin Peterson schrieb:
>> 2009/3/1 Armin Ronacher <armin.ronacher at active-4.com>:
>>> Hi everybody,
>>>
>>> PEP 372 was modified so that it provides a simpler API (only the dict API
>>> to be exact) and it was decided to start with a Python-only implementation
>>> and replace it with a C version later if necessary.
>>>
>>> Annotated changes from earlier versions of the PEP:
>>>
>>> -   the extra API for ordered dict was dropped to keep the interface
>>>    simple and clean.  Future versions can still be expanded but it's
>>>    impossible to drop features later on.
>>>
>>> -   To keep the implementation simple 3.1 / 2.7 will ship with a
>>>    Python-only version of the class.  It can still be rewritten in
>>>    C if it turns out to be too slow or thread safety is required.
>>>
>>> The corresponding issue in the tracker: http://bugs.python.org/issue5397
>>> Link to the PEP: http://www.python.org/dev/peps/pep-0372/
>>>
>>> Anything else that should be done?
>>
>> Have you considered naming? I would think that "odict" or
>> "ordereddict" would be more consistent with other collections names
>> especially "defaultdict".
>
> We're already quite inconsistent with type name casing in the collections
> module, so it wouldn't matter so much.  (Though I'd find symmetry with
> defaultdict pleasing as well.)

+1 for odict. Somehow I thought that was the name proposed by the PEP. :-(

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list