Message161493
> It might help if the error message also stated how many arguments were actually received, like the TypeError message already does for bad function / method calls. E.g.,
>
> "struct.error: pack expected 2 items for packing (got 1)"
Yes, this would be useful. But seldom implemented.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: not enough arguments for format string
>>> '%s %s'%(123,456,789)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: not all arguments converted during string formatting
struct.pack also inconsistent in other error messages.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
struct.error: argument for 's' must be a bytes object
>>> struct.pack('i', '123')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
struct.error: required argument is not an integer
For "s" is mentioned format, and for "i" no. It would be helpful to
mention also the number of the item. |
|
Date |
User |
Action |
Args |
2012-05-24 09:33:34 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, mark.dickinson, mesheb82 |
2012-05-24 09:33:34 | serhiy.storchaka | link | issue14897 messages |
2012-05-24 09:33:34 | serhiy.storchaka | create | |
|