float default formatting

Bernard Delmée bdelmee at advalvas.REMOVEME.be
Thu Mar 24 17:43:11 EST 2005


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.



More information about the Python-list mailing list