compare range objects

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sat Oct 22 08:51:32 EDT 2011


On 2011年10月22日 05:32:44 +0000, Steven D'Aprano wrote:
> On 2011年10月21日 16:42:16 -0700, SigmundV wrote:
>>> On Oct 21, 2:55 am, Yingjie Lan <lany... at yahoo.com> wrote:
>>>>>> In simulation, one can use range objects to denote a discrete domain,
>>> and domain comparison could be very useful. Not just equality, but
>>> also things like if one domain is contained in another.
[...]
> If you need a data type to store large numeric domains, whether discrete
> or continuous, a tree of intervals storing the lower and upper bounds is
> probably the right solution.

And purely by coincidence, I came across this today:
http://docs.pylandro.com/pylandro-collections-range/0.1/tutorial.html
I haven't used the library yet, but it looks impressive.
-- 
Steven


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /