Clarity vs. code reuse/generality

pdpi pdpinheiro at gmail.com
Tue Jul 7 14:30:42 EDT 2009


On Jul 7, 7:26 pm, Andre Engels <andreeng... at gmail.com> wrote:
> On Tue, Jul 7, 2009 at 8:01 PM, pdpi<pdpinhe... at gmail.com> wrote:
> > He asserts:
> >    assert lo < hi
> > but then compares:
> >    sense = cmp(func(hi), func(lo))
>
> > sense can't ever be anything other than 1.
>
> It can - there is no necessity that func is monotonically increasing.
>
> --
> André Engels, andreeng... at gmail.com

Yes, I realized that as I was walking home.

In other news, some of you may be interested in my seminar in advanced
foot-in-mouth placement.



More information about the Python-list mailing list