(Nov-30-2017, 04:52 AM)buran Wrote: Then start coding whatever you want.
this is one of those things i perceive as being too big/complex for me to do. so i will use what other people have made or i will have nothing to use.
@Windspar
how does that handle overlapping ranges? can it handle ranges between strings like ('bar','foo')?
i would also want to compare two ranges objects to know if they represent the same set of ranges (with the same value for each range) regardless of how different overlappings produce these ranges.
and much like a dictionary can produce an iterable, i want to have that. while dict.items() would return an iterable of (key,value), ranges.items() would return an iterable of (from,to,value). either of these can be sorted.
and adding 2 ranges that are exactly adjacent with the same value should (as seen in .items()) become a combined range.
oh, instead of (from,to,value) it could be (range,value). there would be a range class that should be a simple class and then the ranges class that manges many.
then i will get more demanding and want 2D and 3D ranges. or maybe more elaborate shapes. imagine a class where i can merge a cube of 'purple' and a sphere of 'red' and a thing of green defined by a shape class object.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.