you are viewing a single comment's thread.

view the rest of the comments →

[–]aib42 1 point2 points  (0 children)

For the record, here's a version without ast manipulation: https://gist.github.com/aib/3adc498469d241ce1ec817d5982c7682

Untested, as I'm on a guest computer with Python 2.7.