New submission from wang xuancong <xuancon...@gmail.com>:
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 >>> open('./3cjkxdnw/accessibilityLog/1570181896323.csv').read().count('\r') 0 >>> type(open('./3cjkxdnw/accessibilityLog/1570181896323.csv').read()) <class 'str'> >>> type('\r') <class 'str'> Thanks! ---------- messages: 354834 nosy: xuancong84 priority: normal severity: normal status: open title: bug: string search can find \n, but can NEVER find \r type: behavior versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38503> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com