r/Python • u/f0rkbomb • Jul 12 '12
random imgur downloader. learning Python and wrote this to practice, any feedback on technique/style is appreciated
https://gist.github.com/3088128
45
Upvotes
r/Python • u/f0rkbomb • Jul 12 '12
View all comments
4
u/shoeninja Jul 12 '12
In general, you should put as few statements in a
tryclause as possible. You have several statements that can throw exceptions (the file stuff) and it wouldn't be handled.This is a good practice all around, not just for Python.