"min( arg1, arg2, *args )" vs. "print( value, ... )"?

Luuk luuk34 at gmail.com
Wed Apr 8 02:50:07 EDT 2020


On 6-4-2020 22:57, Stefan Ram wrote:
>    The documentation ("help" under CPython 3.9) for "min" reads
>    (simplified):
> 
> min( arg1, arg2, *args )
> 
>    , for "print" it reads (simplified):
> 
> print( value, ... ).
> 
>    The caller can place an arbitrary number of arguments at the
>    place of "value, ..." or of "*args", respectively.
> 
>    So, from the point of view of the caller: is there any
>    difference between "args, ..." and "*args" when he reads
>    it in the documentation?
> 
> 

`arg1, arg2, *args` is just a smart way to say you need at least 2 args.

-- 
Luuk


More information about the Python-list mailing list