Re:The Elements of Python Style
by teddyh on Monday January 04, 2016 @03:33PM
(#10838334)
Note that FileNotFoundError is preferred in modern Python instead of OSError. In case of old Python, one should narrow the catching to cover only the wanted case:
[ Parent
| on HN ]
Re:The Elements of Python Style
by revelation on Monday January 04, 2016 @03:50PM
(#10838475)
I can see why this is the preferred idiom.