Re:Try Three Times
by copsarebastards on Monday March 09, 2015 @02:52PM
(#9173010)
Yes, I do about 25% of my daily dev in Python and have done so for years, and I'm well aware that this is idiomatic in Python. Python was the specific language I was thinking of when I said "almost".
> I guess this prescription about exceptions was made with some specific language in mind and it is dangerous to generalize.
I guess this post about generalizing was made ignoring the word "almost" and it is dangerous to ignore qualifiers.
Duck-typing using exceptions is very idiomatic in Python. Also, raising an exception instead of returning error values is a popular API design. Hell, the iterator API - the foundation of loops in Python - raises an exception (StopIteration).
I guess this prescription about exceptions was made with some specific language in mind and it is dangerous to generalize.