Trouble Understanding O'Reilly Example

Isaac To kkto at csis.hku.hk
Mon Apr 26 00:08:05 EDT 2004


>>>>> "slyraymond" == slyraymond  <sly_raymond at charter.net> writes:

    slyraymond> On page 214 of _Learning Python_, the following function is
    slyraymond> described as one that will return the smallest item in a
    slyraymond> group of arguments:

    slyraymond> def min1(*args): res = args[0] for arg in args[1:]: if arg <
    slyraymond> args: res = arg return res

Should be, if arg < res.

Regards,
Isaac.



More information about the Python-list mailing list