Serhiy Storchaka added the comment:

> But please add regression tests checking
> that the error message is what we want.

Immediately as soon as I find a suitable place for this test. Should be 
somewhere tests for bytes/unicode filenames.

> I'd personally prefer the Oxford Comma there ("string, bytes, or integer").
>  But I don't know if there is a style preference one way or the other in
> Python error messages.

"Invalid whence (%i, should be 0, 1 or 2)"
"expect bytes or str of length 1, or int, "
"argument should be bytes, buffer or ASCII string, "
"coercing to str: need bytes, bytearray or buffer-like object, %.80s found"
"character mapping must return integer, bytes or None, not %.400s"

----------

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

Reply via email to