[issue15972] wrong error message for os.path.getsize

Larry Hastings report at bugs.python.org
Thu Sep 20 23:43:35 CEST 2012


Larry Hastings added the comment:

Patch looks like it'll work fine.  But please add regression tests checking that the error message is what we want.

Are the new error messages okay with the OP?  It looks like now it'll throw TypeError("argument must be string, bytes or integer, not list").

                                                            v
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.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15972>
_______________________________________


More information about the Python-bugs-list mailing list