Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
Changing sniffer logic is risky because it risks breaking existing code that relies on the current predictions. FWIW, in your example, the sniffer gets the desired result if given a delimiter hint: >>> s = "a|b\nc| 'd\ne|' f" >>> pprint.pp(dict(vars(Sniffer().sniff(s, '|')))) {'__module__': 'csv', '_name': 'sniffed', 'lineterminator': '\r\n', 'quoting': 0, '__doc__': None, 'doublequote': False, 'delimiter': '|', 'quotechar': "'", 'skipinitialspace': False} ---------- nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44677> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com