Clarity vs. code reuse/generality

Paul Rubin http
Tue Jul 7 14:06:59 EDT 2009


pdpi <pdpinheiro at gmail.com> writes:
> Personally, I think the code is an unreadable mess, but that's mostly
> because of all the micro optimizations, not the generality of it.
> Here's my unoptimized, but still equally generic, version:

That version doesn't use "sense" inside the binary search, i.e. it
relies on the function being monotonically increasing.



More information about the Python-list mailing list