[Python-Dev] Real-world use of Counter (original) (raw)
Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Nov 5 21:51:19 CET 2014
- Previous message: [Python-Dev] Real-world use of Counter
- Next message: [Python-Dev] Real-world use of Counter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Nov 5, 2014 at 2:47 PM, R. David Murray <rdmurray at bitdance.com> wrote:
As I said on the issue, there is no reason I can see to add extra code just to turn an AttributeError into a TypeError. The AttributeError works just fine in letting you know your input type didn't work.
+1
Unlike ValueError or LookupError, TypeError and AttributeError indicate a logical problem with the code rather than an issue with the user input.
From the programmer perspective, any code that catches and mutates exceptions is a nuisance. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20141105/e5ef7d1f/attachment.html>
- Previous message: [Python-Dev] Real-world use of Counter
- Next message: [Python-Dev] Real-world use of Counter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]