[issue14656] Add a macro for unreachable code

Antoine Pitrou report at bugs.python.org
Wed May 2 15:26:31 CEST 2012


Antoine Pitrou <pitrou at free.fr> added the comment:

> I like the current
> solution: assert(0) + return a almost valid value, but Antoine and
> Benjamin don't like the "almost valid value" (and so prefer a fatal
> error?). We may issue a warning instead of a fatal error (e.g. write a 
> message into stderr with fprintf ?) in release mode.

If there's a bug, either an exception should be raised, or a fatal error.
We should discourage warnings on stderr (the PHP approach).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14656>
_______________________________________


More information about the Python-bugs-list mailing list