Error on string formatting

Judy Hawkins judy at
Tue Feb 8 23:59:17 CET 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
Before you buy.

More information about the Python-list mailing list