Assertion in list comprehension

Chris Mellon arkanes at gmail.com
Wed Aug 1 14:07:55 EDT 2007


On 8/1/07, beginner <zyzhu2000 at gmail.com> wrote:
> On Aug 1, 12:35 pm, "Chris Mellon" <arka... at gmail.com> wrote:
> > On 8/1/07, beginner <zyzhu2... at gmail.com> wrote:
> >

<much snippage>

> I see. In fact I want to whole block surrounded by __debug__ to be
> optimized away in non-debug runs. If the logic of my program is
> correct, the asserts are guaranteed to be true, no matter what the
> input is. It is not input checking.
>

I inferred as much. That's why placing it in a unit or doctest is even better.



More information about the Python-list mailing list