[issue38503] bug: string search can find \n, but can NEVER find \r

2019-10-17 Thread Inada Naoki
Inada Naoki added the comment: It is "universal newline". See https://docs.python.org/3/library/functions.html#open and https://docs.python.org/3/glossary.html#term-universal-newlines -- nosy: +inada.naoki resolution: -> not a bug stage: -> resolved status: open -> closed

[issue38503] bug: string search can find \n, but can NEVER find \r

2019-10-17 Thread wang xuancong
New submission from wang xuancong : If I load a file which contains "\r" and "\n", I can find "\n", but not "\r". This behaviour is inconsistent in Python 3, but consistent in Python 2. >>> open('./3cjkxdnw/accessibilityLog/1570181896323.csv', >>> 'rb').read().count(b'\r') 88 >>>