New submission from Василь Коломієць: with open('example.csv') as csvfile: dialect = csv.Sniffer().sniff(csvfile.read(1024)) csvfile.seek(0) reader = csv.reader(csvfile, dialect) # ... process CSV file contents here ... --
have to be: ... reader = csv.reader(csvfile, dialect=dialect) # ... process CSV file contents here ... It's here: https://docs.python.org/3.4/library/csv.html ---------- assignee: docs@python components: Documentation messages: 258214 nosy: docs@python, Василь Коломієць priority: normal severity: normal status: open title: Error on example using "dialect" parameter. have to be: "dialect=dialect" type: enhancement versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26112> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com