Clarity vs. code reuse/generality

pdpi pdpinheiro at
Tue Jul 7 21:10:59 CEST 2009

On Jul 7, 8:04 pm, Dave Angel <da... at> wrote:
> And of course your clarified function will fail if the func is
> monotonically decreasing.

yeah, I eventually realized that and corrected it... And the assert()/
cmp() confusion too. I blame lack of sleep.

The whole sign/sense thing left a really bad taste in my mouth,
though, and the swapping lo and hi suggestion of yours seems like the
neatest solution presented.

More information about the Python-list mailing list