Error on string formatting
alex at somewhere.round.here
Wed Feb 9 00:20:43 CET 2000
Perhaps it's a matter of operator precedence? Do you want to do
>>> '%0.*f' % (3, 4.1)
> >>> buf = '%0.*f' % 3, 4.1
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> TypeError: not enough arguments for format string
> The comparable statement in C works fine, and the Essential Reference
> says I can do this kind of asterisk thing.
> Judy Hawkins
More information about the Python-list