473,327 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

odict the Ordered Diction 0.2.2

After a break of almost a year there has been an update to `odict the
Ordered Dictionary <http://www.voidspace.org.uk/python/odict.html>`_.

The latest version is 0.2.2, with changes implemented by Nicola Larosa.

Despite over 700 downloads since May (plus 1300 as part of `pythonutils
<http://www.voidspace.org.uk/python/pythonutils.html>`_) there have
been no bug reports, only improvements [#]_. {sm;:-)}

* `Quick Download
<http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=odict.py>`_

What is odict?
==========

**odict** is a pure Python implementation of an ordered dictionary. It
keeps keys in insertion order and allows you to change the order.
Methods (including iteration) that would return members in an arbitrary
order are now ordered.

There is also the `SequenceOrderedDict
<http://www.voidspace.org.uk/python/odict.html#sequenceordereddict>`_
that behaves like a sequence as well as a dictionary. It allows slicing
and the keys, values and items methods are special sequence objects
(which are also callable and so behave as methods too).

What's New ?
==========

Code
-------

Removed the TODO and CHANGELOG sections in the tail docstring (they are
in the docs anyway).

Disabled warnings during tests.

Explicitly disabled tests execution on Python v.2.2 . In addition to
the slicing tests, other ones are failing.

Removed code duplication between the ``__init__`` and the ``update``
methods.

Misc. cleanup.

Also, based on code from `Tim Wegener`_:

- added the ``rename`` method;
- removed a ``has_key`` usage in the ``__setitem__`` method.
Documentation
----------------------

Moved the ISSUES chapter from code's tail docstring to here.

Moved up the `Creating an Ordered Dictionary
<http://www.voidspace.org.uk/python/odict.html#creating-an-ordered-dictionary>`_
chapter.

Added prompts to the code examples and removed the superfluous print
statements (sometimes they were there, sometimes they were not).

Misc. cleanup.

... [#] So either no-one is using it, or it's really good...

Nov 29 '06 #1
1 1463
Thanks for the post,
Its become a part time job keeping up with
updates.

jim-on-linux

http://www.inqvista.com

On Wednesday 29 November 2006 09:41, Fuzzyman
wrote:
After a break of almost a year there has been
an update to `odict the Ordered Dictionary
<http://www.voidspace.org.uk/python/odict.html>
`_.

The latest version is 0.2.2, with changes
implemented by Nicola Larosa.

Despite over 700 downloads since May (plus 1300
as part of `pythonutils
<http://www.voidspace.org.uk/python/pythonutils
.html>`_) there have been no bug reports, only
improvements [#]_. {sm;:-)}

* `Quick Download
<http://www.voidspace.org.uk/cgi-bin/voidspace/
downman.py?file=odict.py>`_

What is odict?
==========

**odict** is a pure Python implementation of an
ordered dictionary. It keeps keys in insertion
order and allows you to change the order.
Methods (including iteration) that would return
members in an arbitrary order are now ordered.

There is also the `SequenceOrderedDict
<http://www.voidspace.org.uk/python/odict.html#
sequenceordereddict>`_ that behaves like a
sequence as well as a dictionary. It allows
slicing and the keys, values and items methods
are special sequence objects (which are also
callable and so behave as methods too).

What's New ?
==========

Code
-------

Removed the TODO and CHANGELOG sections in the
tail docstring (they are in the docs anyway).

Disabled warnings during tests.

Explicitly disabled tests execution on Python
v.2.2 . In addition to the slicing tests, other
ones are failing.

Removed code duplication between the
``__init__`` and the ``update`` methods.

Misc. cleanup.

Also, based on code from `Tim Wegener`_:

- added the ``rename`` method;
- removed a ``has_key`` usage in the
``__setitem__`` method.
Documentation
----------------------

Moved the ISSUES chapter from code's tail
docstring to here.

Moved up the `Creating an Ordered Dictionary
<http://www.voidspace.org.uk/python/odict.html#
creating-an-ordered-dictionary>`_ chapter.

Added prompts to the code examples and removed
the superfluous print statements (sometimes
they were there, sometimes they were not).

Misc. cleanup.

.. [#] So either no-one is using it, or it's
really good...
Nov 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
by: Jim Cobban | last post by:
I cannot get Netscape 4.79 to properly display the ordered list in the following fragment. <P>Get a specific portion of the date. Depending upon the value of index: <ol start=0> <li>complete...
0
by: Fuzzyman | last post by:
The response to pythonutils__ was very good. Especially the odict__ module (ordered dictionary) - it's had over one hundred and fifty downloads already. Thanks to some useful user feedback, Nicola...
1
by: JohnA | last post by:
Dear all, I'm trying to compose a query, but I don't know how to express the statement. I have 4 tables: Customers, Orders, Order Details and Products. Each customer has many orders and each...
210
by: Christoph Zwerschke | last post by:
This is probably a FAQ, but I dare to ask it nevertheless since I haven't found a satisfying answer yet: Why isn't there an "ordered dictionary" class at least in the standard list? Time and again...
22
by: bearophileHUGS | last post by:
>From this interesting blog entry by Lawrence Oluyede: http://www.oluyede.org/blog/2006/07/05/europython-day-2/ and the Py3.0 PEPs, I think the people working on Py3.0 are doing a good job, I am...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.