Martin Panter added the comment: I agree it would be worth checking for a slowdown.
As well as giving the option of omitting the table argument, it would make call sites easier to read. It would avoid suggesting that the first argument is translated to the second, like maketrans(). data = data.translate(YENC_TABLE, delete=b"\r\n") Translate() already accepts None as the first argument; this is not new: >>> b"hello".translate(None, b"l") b'heo' I guess the optional group was used as a way of making the second argument optional without a specific default value. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27506> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com