New submission from bland328 <br...@landwehr.net>:
Attempting to replace a character in a bytes string literal results in an exception saying that "a bytes-like object is required, not 'str'", when (unless I'm missing something) it should say the opposite. To repro: >>> x=b'abc' >>> x.replace('a','z') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: a bytes-like object is required, not 'str' ---------- messages: 387593 nosy: bland328 priority: normal severity: normal status: open title: str.replace() TypeError exception message backward type: behavior versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43309> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com