"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I once considered and rejected this syntax since another logical
> interpretation would be that any positional arguments are accepted but
> *ignored*.
I was about to suggest that perhaps this is how it should be interpreted
;-).
Perhaps it is too much to use syntax to indicate whether positional args
should be silently ignored or raise an exception. Given
def f(*ignored, a, b='yes'): <body>
positional args will be ignored if 'ignored' if never referenced again. To
raise an exception, just add
if ignored: raise TypeErrror("Positional args not allowed")
Given that keyword only functions should be fairly rare (given that we have
survived thus long without), is a syntactic abbreviation needed?
Terry Jan Reedy
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com