Verbose and flexible args and kwargs syntax

Ian Kelly ian.g.kelly at gmail.com
Mon Dec 12 23:52:11 EST 2011


On Mon, Dec 12, 2011 at 7:43 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> If I want to collect a sequence of arguments into a string, why shouldn't
> I be allowed to write this?
>
>    def func(parg, str(args)): ...

Obviously, because the correct syntax would be:

def func(parg, ''.join(args)): ...

:-P



More information about the Python-list mailing list