[issue11462] Peephole creates duplicate and unused constants

Antoine Pitrou report at bugs.python.org
Fri Mar 11 17:52:59 CET 2011


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

> > - why the "#ifndef NDEBUG" path?
> These entries in the table should not be used, but if something slips
> through and uses one of them, it's much easier to tell if we remap to
> invalid value. As this is an internal check, I didn't want it in
> release mode. If this is deemed unnecessary or confusing I can remove
> it.

I think it is confusing indeed. If you want to do a check in debug mode
only, just use assert() (and perhaps add a comment if the check doesn't
look obvious).

----------

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


More information about the Python-bugs-list mailing list