why brackets & commas in func calls can't be ommited? (maybe it could be PEP?)

Paul Rubin http
Thu Mar 22 14:28:27 EDT 2007


Steve Holden <steve at holdenweb.com> writes:
> > I agree that in you example the first syntax yields a full /five/
> > spaces less than the second syntax. However, it ignores the fact
> > that if you are creating functions with that many arguments, you are
> > probably doing something wrong. Can't those arguments be provided as
> > a list?
> 
> I'm in danger of getting short-tempered on c.l.py for the first time
> in a long time. If you think that five arguments is an excessive
> number for a function then you live in a world of toy programs.

There's no need for functions of more than one argument.  Even in
existing Python syntax, instead of

   def f(a,b,c,d,e): ...

you could say

   def f((a,b,c,d,e)): ...

and receive a,b,c,d,e in a single tuple.



More information about the Python-list mailing list