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 martin.panter
Recipients martin.panter, r.david.murray, serhiy.storchaka, xiang.zhang
Date 2016-08-18.01:00:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471482028.98.0.695620864739.issue27506@psf.upfronthosting.co.za>
In-reply-to
Content
I can look at enhancing the tests at some stage, but it isn’t a high priority for me.

Regarding translate() with no arguments, it makes sense if you see it as a kind of degenerate case of neither using a translation table, nor any set of bytes to delete:

x.translate() == x.translate(None, b"")

I admit it reads strange and probably isn’t useful. If people dislike it, it might be easiest to just add the keyword support and keep the first parameter as mandatory:

without_nulls = bytes_with_nulls.translate(None, delete=b"\x00")
History
Date User Action Args
2016-08-18 01:00:29martin.pantersetrecipients: + martin.panter, r.david.murray, serhiy.storchaka, xiang.zhang
2016-08-18 01:00:28martin.pantersetmessageid: <1471482028.98.0.695620864739.issue27506@psf.upfronthosting.co.za>
2016-08-18 01:00:28martin.panterlinkissue27506 messages
2016-08-18 01:00:28martin.pantercreate