diff python/safe.py @ 6:a01ff74f9fd7

fix accumulator bug in Lava.__init__
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Tue, 25 May 2021 17:20:04 -0400
parents 56508a6033a9
children 3ee329b129c6
line wrap: on
line diff
--- a/python/safe.py	Tue May 25 17:19:00 2021 -0400
+++ b/python/safe.py	Tue May 25 17:20:04 2021 -0400
@@ -49,7 +49,7 @@
       for l in lava:
         x=[float(i) for i in l.split('\t')[2].split(',')]
         k=(x[0],x[2])
-        kk=ll.get(k,list())
+        kk=ll.setdefault(k,list())
         kk.append(x)
   
 L=Lava('lava.tsv')