PyWart: Language missing maximum constant of numeric types!
neilc at norwich.edu
Fri Feb 24 15:25:56 CET 2012
On 2012-02-24, Rick Johnson <rantingrickjohnson at gmail.com> wrote:
> I get sick and tired of doing this!!!
> if maxlength == UNLIMITED:
> elif len(string) > maxlength:
> What Python needs is some constant that can be compared to ANY
> numeric type and that constant will ALWAYS be larger!
What's the point of that?
The only time I've naively pined for such a thing is when
misapplying C idioms for finding a minimum value.
Python provides an excellent min implementation to use instead.
More information about the Python-list