Commit f6375d1d authored by Leo Pound Singer's avatar Leo Pound Singer

lal.rate: avoid mutating dictionary while iterating over it

In Python 3, the builtin zip() function returns an iterator, not
a list. This would result in mutating the dictionary while iterating
over it, which is not allowed.
Original: b0f1b86d8746054b9511710a35398a848ffc5ef6
parent 82130b0f
......@@ -1285,7 +1285,7 @@ class NDBins(tuple):
xml_bins_name_mapping = dict((cls.xml_bins_name, cls) for cls in (LinearBins, LinearPlusOverflowBins, LogarithmicBins, LogarithmicPlusOverflowBins, ATanBins, ATanLogarithmicBins, Categories, HashableBins))
xml_bins_name_mapping.update(zip(xml_bins_name_mapping.values(), xml_bins_name_mapping.keys()))
xml_bins_name_mapping.update(list(zip(xml_bins_name_mapping.values(), xml_bins_name_mapping.keys())))
def to_xml(self, elem):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment