On 2020-04-08 08:50:07 +0200, Luuk wrote:
> 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.
min(arg1, arg2, *args) is Python syntax.
min(arg1, arg2, args, ...) isn't. It is kind of C-like, but not really.
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | [email protected] | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman/listinfo/python-list
