On Mon, Jun 17, 2013 at 10:04 AM, Walter Dörwald <wal...@livinglogic.de> wrote: > I expected that eval()ing a string that contains the characters > > U+0027: APOSTROPHE > U+0027: APOSTROPHE > U+0027: APOSTROPHE > U+000D: CR > U+000A: LR > U+0027: APOSTROPHE > U+0027: APOSTROPHE > U+0027: APOSTROPHE > > to return a string containing the characters: > > U+000D: CR > U+000A: LR
No. Executing a file containing those exact characters produces a string containing only '\n' and exec/eval is meant to behave the same way. The string may not have originated from a file, so the universal newlines behavior of the io module is irrelevant here -- the parser must implement its own equivalent processing, and it does. -- --Guido van Rossum (python.org/~guido) _______________________________________________ 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