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.

classification
Title: Undocumented behavior in csv.Sniffer (preferred delimiters)
Type: behavior Stage: needs patch
Components: Documentation, Library (Lib) Versions: Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: avi, docs@python, thomas
Priority: normal Keywords:

Created on 2019-04-01 13:54 by thomas, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg339291 - (view) Author: Thomas Buhrmann (thomas) Date: 2019-04-01 13:54
When the Sniffer detects more than one possible delimiter, as e.g. in the following file

"a;b;c;d,e;f;g;h"

the result will always be the ',' delimiter, independent of how "dominant" another delimiter is. This is because the codepath analyzing dominance will only get executed if the undocumented Sniffer member Sniffer.preferred is overwritten by the user after initialization.

While not strictly a bug, the behavior should probably be documented, and the 'preferred' member could be exposed as an argument in __init__() perhaps?
msg346926 - (view) Author: Avinash Sajjanshetty (avi) * Date: 2019-06-30 12:23
can I take up this issue?
History
Date User Action Args
2022-04-11 14:59:13adminsetgithub: 80678
2019-06-30 12:23:03avisetnosy: + avi
messages: + msg346926
2019-04-01 13:57:00SilentGhostsetversions: + Python 3.8
nosy: + docs@python

assignee: docs@python
components: + Documentation
stage: needs patch
2019-04-01 13:54:16thomascreate