Replace weird error message?

the.gerenuk at googlemail.com the.gerenuk at googlemail.com
Wed Mar 16 14:34:48 EDT 2016


The following error message, makes it a bit hard to understand what went wrong

>>> "{:02}".format("1")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: '=' alignment not allowed in string format specifier

(this can happen easily if you read in text files and forget to convert)

Do you think some better error message should be used?

For example a hint that "0" does work for the given argument.



More information about the Python-list mailing list