R. David Murray added the comment:

I agree that the 2.7 message is somewhat confusing, but I'm not sure it is 
worth changing at this point in 2.7's life cycle.  

For Python3, the message is correct and unambiguous: a bytes object is not a 
string.

However, in 3.3, we have a regression:

rdmurray@hey:~/python/p34>python3.3 -c 'import csv; reader = csv.reader("foo", 
delimiter=b",")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: delimiter must be set

So that needs to be tracked down and fixed.

----------
keywords: +3.3regression, easy
nosy: +r.david.murray
stage:  -> needs patch
title: csv produces confusing error message for unexpected string encoding -> 
csv produces confusing error message when passed a non-string delimiter
versions: +Python 3.3, Python 3.4 -Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18829>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to