Good data structure for finding date intervals including a given date

Daniel Stutzbach stutzbach at google.com
Mon May 21 12:46:32 EDT 2012


On Wed, May 16, 2012 at 5:38 AM, Jean-Daniel <jeandaniel.browne at gmail.com>wrote:

> On Sun, May 13, 2012 at 2:29 PM, Alec Taylor <alec.taylor6 at gmail.com>
> wrote:
> > There is an ordered dict type since Python 3.1[1] and Python 2.7.3[2].
>
> Ordered dict are useful, but they only remember the ordered in which
> they were added, you can not order them a on key.
>

For what it's worth, my blist package (mentioned earlier in the thread)
also provides sortedlist and sorteddict classes which efficiently keep
items in sorted order.

I don't think those are enough on their own to create a efficient solution,
but they might be useful parts of an efficient solution.

More information:
http://pypi.python.org/pypi/blist
http://stutzbachenterprises.com/blist/

-- 
Daniel Stutzbach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120521/9c61024f/attachment.html>


More information about the Python-list mailing list