Type checking versus polymorphism (was: list(), tuple() should not place at "Built-in functions" in documentation)

Chris Rebert clp2 at rebertia.com
Sat Jul 16 07:02:03 CEST 2011

On Fri, Jul 15, 2011 at 7:47 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> Assertions are for testing internal program logic, not for validation.
> (I don't even like using assert for testing. How do you test your code with
> assertions turned off if you use assert for testing?)

I would think that would only matter if either the asserted
expressions caused side-effects or there was nontrivial logic in the
AssertionError handler, which would indicate a rather screwy codebase
and point to a possible PEBKAC issue that testing cannot hope to


More information about the Python-list mailing list