bland328 added the comment:
Dumb misunderstanding on my part--didn't realize replace() would actually work
on a bytes-type object, so *I* had it backwards.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
New submission from bland328 :
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