New submission from jaywalker <jaywal...@yahoo.com>: The following code from the documentation fails: ################# import csv reader = csv.reader(open("eggs.csv", "rb")) for row in reader: print(row) ##################### The output is: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 3, in <module> _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)
It works as expected in python 2.6 ---------- components: Library (Lib) messages: 79165 nosy: jaywalker severity: normal status: open title: csv fails when file is opened in binary mode versions: Python 3.0 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4847> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com