[New-bugs-announce] [issue5580] Strange error message in Python/getargs.c

Andrii V. Mishkovskyi report at bugs.python.org
Fri Mar 27 16:35:58 CET 2009


New submission from Andrii V. Mishkovskyi <mishok13 at gmail.com>:

I think the following message is a little bit confusing:
Python 2.7a0 (trunk, Mar 17 2009, 12:06:19)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> open('abc\x00')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: file() argument 1 must be (encoded string without NULL
bytes), not str

This message could be much more better if unneeded parentheses were
removed. :)
The message on line 861 in Python/getargs.c reads much better:
"string without null bytes"
Would it be appropriate to change the message in topic to something like
this?

----------
messages: 84264
nosy: mishok13
severity: normal
status: open
title: Strange error message in Python/getargs.c
versions: Python 2.7

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


More information about the New-bugs-announce mailing list