"Steven D'Aprano" <[EMAIL PROTECTED]> writes:

> I have a sinking feeling I'm missing something really, really
> simple.

"Oh no, everyone in the galaxy gets that, that's perfectly natural
paranoia."

> I'm looking for a format string similar to '%.3f' except that
> trailing zeroes are not included.

Can;t be done, to my knowledge. You specify a particular precision,
and the number will be formatted at that precision. This matches the
'printf' behaviour that inspired string formatting operations.

If your brute-force approach works, stick to that until you have a
reason to look for something better.

-- 
 \     "I have an answering machine in my car. It says, 'I'm home now. |
  `\      But leave a message and I'll call when I'm out.'"  -- Steven |
_o__)                                                           Wright |
Ben Finney

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to