Comparing objects in a list against each other
I find the problem you are trying to solve to be as hard to grasp from the code presented as from the description:
- document your code, using the conventions of the language (&amp;environment) of choice.
- use telling names


In the for-loop, you don't use i: don't use enumerate().
I think the first comprehension easier to understand with reading (? "r") mentioned first:
measurement = (y for y in self.records if reading.&lt;predicate&gt;(y))
I think it confusing to use the same identifier for unrelated objects in one and the same statement - suggesting if not any(reading in n for n in new):
instead of if &lt;condition&gt;: &lt;pass&gt; else: &lt;act&gt; do
if not &lt;condition&gt;: &lt;act&gt;
compare_record_same_name() is a horrible name, as it mentions only half of what the function checks. It seems it is there to check whether the other record belongs to the same "measurement" - name it for that: same_measurement().
instead of converting duration to seconds each and very time, make TIME_SEPARATOR a timedelta


I'd try a different approach:


readings with different instrument names do not belong to the same measurement, anyway:
use a separate collection for each name
sort each collection by time (hoping the method used makes good use of what order is bound to exist in input)
any gaps exceeding TIME_SEPARATOR separate measurements
if the time covered by any group g is too big for one measurement, split at large internal gaps or evenly by number of readings or time range or …