On Sat, Apr 29, 2006, Talin wrote: > > Specification > > Syntactically, the proposed changes are fairly simple. The first > change is to allow regular arguments to appear after a varargs > argument: > > def sortwords(*wordlist, case_sensitive=False): > ... > > This function accepts any number of positional arguments, and it > also accepts a keyword option called 'case_sensitive'. This > option will never be filled in by a positional argument, but > must be explicitly specified by name. > > Keyword-only arguments are not required to have a default value. > Since Python requires that all arguments be bound to a value, > and since the only way to bind a value to a keyword-only argument > is via keyword, such arguments are therefore 'required keyword' > arguments. Such arguments must be supplied by the caller, and > they must be supplied via keyword.
You should show with simulated doctests what happens when you call required keyword functions correctly and incorrectly. You should also show an example of a required keyword function where the parameter does not have a default value. -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "Argue for your limitations, and sure enough they're yours." --Richard Bach _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com