[New-bugs-announce] [issue26334] bytes.translate() doesn't take keyword arguments; docs suggests it does
Nicholas Chammas
report at bugs.python.org
Wed Feb 10 14:52:44 EST 2016
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 last):
File "<stdin>", line 1, in <module>
TypeError: translate() takes no keyword arguments
```
I'm guessing other methods have this same issue. (e.g. `str.translate()`)
Do the docs need to be updated, or should these methods be updated to accept keyword arguments, or something else?
[0] https://docs.python.org/3/library/stdtypes.html#bytes.translate
----------
assignee: docs at python
components: Documentation, Library (Lib)
messages: 260034
nosy: Nicholas Chammas, docs at python
priority: normal
severity: normal
status: open
title: bytes.translate() doesn't take keyword arguments; docs suggests it does
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26334>
_______________________________________
More information about the New-bugs-announce
mailing list