what is the most concise way in Python to compute interval overlap size?
overlap([a, b], [c, d])
should return 0 if intervals are identical, N when they overlap but not identical (where N is overlap) and None if they are not overlapping.
thanks.
edit: overlap
is misleading i mean the size by which the intervals are non-overlapping. so 0 is they are identical.