Title: Undocumented behavior in csv.Sniffer (preferred delimiters)
Type: behavior Stage: needs patch
Components: Documentation, Library (Lib) Versions: Python 3.8, Python 3.7
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 2019-06-30 12:23 by avi.

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


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?
Date User Action Args
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