This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients martin.panter, r.david.murray, serhiy.storchaka, xiang.zhang
Date 2016-08-11.20:49:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
PyArg_ParseTupleAndKeywords can be slower than PyArg_ParseTuple even for positional arguments. We need benchmarking results (especially after committing a patch for issue27574).

What is the purpose of adding support of the delete argument as keyword arguments? It looks to me, that the only purpose is allowing to specify the delete argument without specifying the table argument. There are two alternative ways to achieve this: make translate() accepting some special value (e.g. None) as the default value for the first argument:

    b'hello'.translate(None, b'l')

or make translate() accepting the delete argument as keyword argument:


The patch does both things, but only one is needed. If add the support of the delete argument as keyword argument, I would prefer to not add the support of None as the first argument, but would specify its default value as bytes(range(256)):

    table: object(c_default="NULL") = bytes(range(256))
    delete as deletechars: object(c_default="NULL") = b''

I don't know why optional group was used here, the function could be implemented without it.
Date User Action Args
2016-08-11 20:49:12serhiy.storchakasetrecipients: + serhiy.storchaka, r.david.murray, martin.panter, xiang.zhang
2016-08-11 20:49:12serhiy.storchakasetmessageid: <>
2016-08-11 20:49:12serhiy.storchakalinkissue27506 messages
2016-08-11 20:49:12serhiy.storchakacreate