On Fri, Jun 14, 2013 at 2:11 PM, Ron Adam <ron3...@gmail.com> wrote: > > > On 06/14/2013 10:36 AM, Guido van Rossum wrote: >> >> Not a bug. The same is done for file input -- CRLF is changed to LF before >> tokenizing. > > > > Should this be the same? > > > python3 -c 'print(bytes("""\r\n""", "utf8"))' > b'\r\n' > > >>>> eval('print(bytes("""\r\n""", "utf8"))') > b'\n'
No, but: eval(r'print(bytes("""\r\n""", "utf8"))') should be. (And is.) What I believe you and Walter are missing is that the \r\n in the eval strings are converted early if you don't make the enclosing string raw. So what you're eval-ing is not what you think you are eval-ing, hence the confusion. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com