Martin Panter added the comment:
Nicholas, there is Issue 8706 about converting functions and methods to accept
keywords in general.
There is also the slash “/” indicator proposed by PEP 457, which is used for
some functions in pydoc; bytes.replace() for instance. In Issue 23738 I was
trying
Terry J. Reedy added the comment:
This is a known, generic issue with c-coded functions. Some C functions have
been converted, especially those with boolean parameters, and especially those
with multiple boolean parameters.
I think, but an not sure, that / is sometimes used to signal that
Nicholas Chammas added the comment:
Yep, you're right. I'm just understanding now that we have lots of methods
defined in C which have signatures like this.
Is there an umbrella issue, perhaps, that covers adding support for
keyword-based arguments to functions defined in C, like
Nicholas Chammas added the comment:
So you're saying if `bytes.translate()` accepted keyword arguments, its
signature would look something like this?
```
bytes.translate(table, delete=None)
```
I guess I was under the mistaken assumption that argument names in the docs
always matched keyword
New submission from Nicholas Chammas:
The docs for `bytes.translate()` [0] show the following signature:
```
bytes.translate(table[, delete])
```
However, calling this method with keyword arguments yields:
```
>>> b''.translate(table='la table', delete=b'delete')
Traceback (most recent call
SilentGhost added the comment:
I don't think docs suggest that in any way. The keyword arguments are typically
described like this: https://docs.python.org/3/library/stdtypes.html#str.split
bytes.translate has a typical signature of a function with optional positional
arguments.
--