On 4/21/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 4/21/06, Talin <[EMAIL PROTECTED]> wrote: > > The variation that I was thinking of was a little shorter, but not > > necessarily better: > > > > def foo( a, b; x=1, y=2 ): ... > > That cropped up in my head too long ago. I think I've seen something > like this in another language. (Perl? VB?) But it reverses the > priority of ';' and that's not very nice.
I'm not sure I follow the priority argument (except in a purely parser-technical sense, I guess). For me, the parentheses ensure that I only think about the parameter list in relation to the semicolon, and the semicolon (meaning roughly "and then") nicely splits the positional arguments from the non-positional ones. If keyword-only arguments *without* a default were involved, def foo(a, b; x, y=1): ... doesn't look good. But I'd be happy with mandating that keyword-only arguments must have a default (it's similar in principle to the rule in option parsing that (keyword) options should be optional, and hence have viable defaults. (See the optparse documentation, section 13.3.1.2 in the Python library reference.) I prefer semicolon to a bare *, but I'm not going to start a crusade over it... Paul. _______________________________________________ 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