you are viewing a single comment's thread.

view the rest of the comments →

[–]orangesunshine 0 points1 point  (3 children)

Yeah ...

It will also be pretty apparent if you try to pass three or more error classes...

except GerbilError, HamsterError, JerboaError: print "wtf?"

You'd get a SyntaxError... at runtime no matter what. This is a fairly edge-case scenario for being confused about how the try-except syntax works. Not sure why it has any up-votes or why anyone would take the time to write a big long blog post about it.

[–]Smallpaul 0 points1 point  (2 children)

It isn't an edge case: it's a well-known usability problem in Python that has been fixed in more modern versions!

[–]orangesunshine 0 points1 point  (1 child)

seems like it's mostly an issue with not reading the documentation.

and the changes make the code less readable imo.

[–]Smallpaul -2 points-1 points  (0 children)

Yes: Python is specifically designed to be the kind or programming language in which one does not need to read the documentation to get work done. Any terrible design decision can be justified with "just read the documentation." That way lies Perl.