[Python-ideas] keyword arguments everywhere (stdlib) - issue8706
tjreedy at udel.edu
Fri Mar 2 23:23:59 CET 2012
On 3/2/2012 3:32 PM, Ethan Furman wrote:
> Guido van Rossum wrote:
>> I would actually like to see a syntactic feature to state that an
>> argument *cannot* be given as a keyword argument (just as we already
>> added syntax to state that it *must* be a keyword).
I think this is what we need. I see the problem as being that a) C and
Python functions work differently, and b) the doc does not -- and should
not -- specify the implementation. One solution is to make all C
functions work like Python functions. The other is to allow Python
functions to work like C functions. Given the reasonable opposition to
the first, we need the second.
> So something like:
> def ord(char, ?):
> def split(self, char, ?, count)
> def canary(breed, ?, color, wingspan, *, name)
That is probably better than using '$' or directly tagging the names.
Terry Jan Reedy
More information about the Python-ideas