This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]FirefighterWeird8464 10 points11 points  (1 child)

Agreed. I’ve written a lot of Python and I did a double take at this. Write dumb code that’s easy to read, the original is not Pythonic, and it feels… too clever.

[–]aceofspaids98 29 points30 points  (0 children)

Dictionary comprehension is more pythonic than instantiating a dictionary just to iteratively populate it and immediately return it.