Commits

Gunnlaugur Þór Briem committed 5f70a37 Draft

Fix unnecessary Python 2.6 incompatibility

This one use of a dict comprehension seems to be the only thing
preventing openpyxl from running/installing in Python 2.6. So changing
to the old dict(generator) form.

Comments (0)

Files changed (1)

openpyxl/datavalidation.py

     raw_coords = [coordinate_from_string(cell) for cell in cells]
 
     # Group up as {column: [list of rows]}
-    grouped_coords = {k: [c[1] for c in g] for k, g in
-                      groupby(sorted(raw_coords, key=keyfunc), keyfunc)}
+    grouped_coords = dict((k, [c[1] for c in g]) for k, g in
+                          groupby(sorted(raw_coords, key=keyfunc), keyfunc))
 
     ranges = list(input_ranges)