On 2014-11-11, Ben Finney <[email protected]> wrote:
> An ‘assert’ statement in the code will sometimes be active, and
> sometimes be a no-op, for *exactly* the same code under different
> circumstances.
Yep, it's the same in C, C++, Java, PHP, and other languages. I think
most people know that asserts can be disabled (either at run-time or
compile time), and often are for performance reasons.
> That's a trap for the reader, and I'd rather not set it.
Personally, I find that too many asserts often makes code hard to read
just because of the visual clutter and the veritical "spread" it
induces.
--
Grant Edwards grant.b.edwards Yow! I hope I bought the
at right relish ... zzzzzzzzz
gmail.com ...
--
https://mail.python.org/mailman/listinfo/python-list