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
Writing them inside {} is meant to make them look like a set, therefore unordered. Problem is it looks a little ugly when all you have is keyword-only args: def spam({d, e, f=x}): ... So maybe you should be able to write that as def spam{d, e, f=x}: ... Then if you have some positional args as well, def spam(a, b, c){d, e, f=x}: ... And incorporating all the possible features, def spam(a, b, c=y, *d){e, f=x, **g}: ... Although now that the ** arg is inside the {}, there's no longer any need for the double *, so it could just be def spam(a, b, c=y, *d){e, f=x, *g}: ... -- Greg _______________________________________________ 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