New submission from Thomas Buhrmann <thomas.buehrm...@gmail.com>:
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? ---------- components: Library (Lib) messages: 339291 nosy: thomas priority: normal severity: normal status: open title: Undocumented behavior in csv.Sniffer (preferred delimiters) type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36497> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com