Anton <anschat...@gmail.com>:

> Right, but the goal is not to make the CONFUSED status be handled
> without coding, but to be notified about an unknown status code and
> act accordingly.

Asserts are not about notification, checking or optimization. They are
about communicating what's going on in the programmer's mind. They are
comments.

So why use asserts instead of comments?

Asserts *could* help in fixing bugs:

  1. An assertion failure immediately, unambiguously, declares even to
     customer service representatives that this is a terrible bug and
     should be brought to R&D's attention instead of hazing the poor
     customer with standard questions ("have you updated?", "have you
     rebooted?").

  2. An assertion failure probably gives the developer an very good clue
     as to what has gone wrong. There is a good chance of quickly
     finding an accurate analysis and fix to the bug.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to