Error on string formatting

Judy Hawkins judy at dvcorp.com
Tue Feb 8 17:59:17 EST 2000


Why this:

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


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list