This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients pt12lol, python-dev, rhettinger
Date 2021-07-22.02:15:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626920115.35.0.271412428254.issue44677@roundup.psfhosted.org>
In-reply-to
Content
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}
History
Date User Action Args
2021-07-22 02:15:15rhettingersetrecipients: + rhettinger, python-dev, pt12lol
2021-07-22 02:15:15rhettingersetmessageid: <1626920115.35.0.271412428254.issue44677@roundup.psfhosted.org>
2021-07-22 02:15:15rhettingerlinkissue44677 messages
2021-07-22 02:15:14rhettingercreate