Range Operation pre-PEP

Christopher A. Craig com-nospam at ccraig.org
Thu May 17 07:58:28 EDT 2001


"Andrew Henshaw" <andrew_dot_henshaw_at_earthling_dot_net> writes:

> Is there a reason that you need the 'reduce'?
> 
>     max(sys.stdin.read())
> 
> should work.

I does.  I didn't remember that if max is supplied with a sequence as
a single argument it will return the largest value in that sequence.
Sort of funny since that used to be the only behavior for max...

-- 
Christopher A. Craig <com-nospam at ccraig.org>
"There is no subject, however complex, which--if studied with patience
and intelligence--will not become more complex." New Speaker's Handbook



More information about the Python-list mailing list