bytearray() shouldn't convert ' to \' for readability and consistency #137190
Closed as duplicate of#71679
bytearray() shouldn't convert ' to \' for readability and consistency #137190
Bug report
Bug description:
bytearray() converts
'to\'while bytes() doesn't as shown below sobytearray()shouldn't do that for readability and consistency:In addition, both
bytearray()andbytes()work for"properly as shown below:CPython versions tested on:
3.12
Operating systems tested on:
Windows