Are you trying to do currency? There are better ways, using the locale
methods.
No, just dumping some data structures and I'd rather not
check every item's type and format floats explicitly.
I was hoping the sprintf mask float's __str__ probably
uses was somehow exposed and could be altered.
--
ht
Bernard Delmée <[EMAIL PROTECTED]> wrote:
>
>Is there a simple way to modify the default sprintf mask
>used for floats ? (eg something like sys.float_mask = '%.2f')
>I've tried assigning to float.__dict__[ '__str__' ], but
>that's apparently not allowed.
No. The mask string is passed relatively d
Is there a simple way to modify the default sprintf mask
used for floats ? (eg something like sys.float_mask = '%.2f')
I've tried assigning to float.__dict__[ '__str__' ], but
that's apparently not allowed.
--
http://mail.python.org/mailman/listinfo/python-list