[Python-ideas] Unpack of sequences

Nick Coghlan ncoghlan at gmail.com
Thu Aug 30 10:38:57 CEST 2012

On Thu, Aug 30, 2012 at 5:57 PM, Paul Moore <p.f.moore at gmail.com> wrote:
> Rereading the above, the only major issue I see with this is that the
> comma/colon distinction is visually a bit too light. Adding parens
> might help, but probably gets a bit too punctuation-heavy:
>     bind (a=None, b=None): *args
>     bind (a=None, b=None, **other): **mapping

We use "bind" as a method name in the standard library. Other possible
keywords are likely to have the same problem - it's not a space rich
in suitable terminology. Opening the statement with "|" would suffice
though - it's otherwise invalid at the start of an expression, so it
gives a lot of freedom in the grammar details for the rest of the
statement, including the spelling of the assignment details (you could
even reuse a single "=", something like ":=" or "()=" or else Terry's
TIE fighter notation "(=)")


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list