Guido van Rossum wrote: > On 4/20/06, Greg Ewing <[EMAIL PROTECTED]> wrote: > >>Some wilder ideas for keyword-only arguments: >> >> def spam(a, b, c, {d, e, f=x}): >> # d, e are mandatory keyword-only >> # f is optional keyword-only > > > IMO anything using any kind of nested brackets inside the argument > list is doomed. Such syntax is too close to resembling a single > argument with a complex sub-structure, even if there's a prefix > operator.
I thought I remembered some talk about removing sub-structure from functions signatures in py3k...? It's a pretty obscure feature, and when the substructure pattern doesn't match the call the exception is hard to decypher. >>> def p((x, y)): pass >>> p(1) Traceback (most recent call last): File "<stdin>", line 1, in ? File "<stdin>", line 1, in p TypeError: unpack non-sequence ...that exception is actually considerably worse than I expected. -- Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com