[issue40762] Writing bytes using CSV module results in b prefixed strings

Skip Montanaro report at bugs.python.org
Wed May 27 06:14:50 EDT 2020


Skip Montanaro <skip.montanaro at gmail.com> added the comment:

This likely worked in the past because bytes == str in Python 2.x. This is just a corner case people porting from 2 to 3 need to address in their code. Papering over it so people using Pandas don't have to do the right thing is no reason to make changes. Bytes aren't strings any longer. A huge effort was undertaken to clean up this aspect of Python's data model in the move to Python 3. Conflating bytes and strings at this point (no matter which way you try to accomplish that conflation) makes no sense to me. 

The current behavior should not be changed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40762>
_______________________________________


More information about the Python-bugs-list mailing list