Closed joefutrelle closed 6 years ago
Also in utils.py
targets = {**targets, **new_targets}
which I think is easier to fix ...
Both lines should be easily made compatible with 3.4. Again, I'm not really well equipped to make any commits right now, but the required changes are pretty minimal. See link below.
https://stackoverflow.com/questions/38987/how-to-merge-two-dictionaries-in-a-single-expression
In addition, there are circular imports between database and utils, which could be addressed via refactoring.
Pardon my denseness, but is there a difference between
result = json.dumps({**{**result1, **result2}, **result3})
and
result = json.dumps({**result1, **result2, **result3})
?
No. I think initially it was only result1
and result2
and when I added result3
I was too lazy to test if that syntax worked with more than 2 dicts.
Got it, then this is an easy fix, thanks.
For deployment purposes I would like to use Debian Jessie which ships with Python 3.4, however the following line in
views.py
uses a syntax that is not supported in 3.4:can this be rewritten to not use syntactic features added after 3.4?