Commits

Ilja Heckmann committed 9306ebe

used better idiom for list copies

  • Participants
  • Parent commits c6359b6

Comments (0)

Files changed (1)

File source/analysis.py

     """
     buckets = defaultdict(list)
     for di in data1:
-        buckets[di[0]] = di[1][:]
+        buckets[di[0]] = list(di[1])
     for di in data2:
         buckets[di[0]].extend(di[1])
     return [(xpos, buckets[xpos]) for xpos in sorted(buckets.keys())]
                 break
 
         # return a copy since 'window' may not be changed from outside
-        yield window[:]
+        yield list(window)
 
         bin_lens.append(len(window))