On Jan 31, 7:11 pm, Paul Rubin <http://[EMAIL PROTECTED]> wrote:
> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> > True...  Any lighter-weight implementation of
> > sets out there?  That is, one that would defer
> > use of resources until actually needed --
> > somewhat akin to the distinction between
> > range and xrange, and so on.
>
> Don't even think of doing it that way, that solves the space problem
> but leaves a speed problem.  You probably want to use something like
> sort the intervals and then use the bisect module to find the
> intervals intersecting a given one.

I haven't actually used it but from the short description this package
seems to fit the bill: http://pypi.python.org/pypi/interval/1.0.0

George
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to