Message97284
The documentation states: "Most built-in types implement the following options for format specifications, although some of the formatting options are only supported by the numeric types."
The list doesn't include "s" presentation type, which is actually accepted for most built-in types *except* numeric ones. So you can write:
>>> "{:s}".format([])"
'[]'
But with numeric types you have to explicitly convert:
>>> "{!s:s}".format(5)
'5'
>>> "{:s}".format(5) # fails |
|
Date |
User |
Action |
Args |
2010-01-06 00:32:43 | lrekucki | set | recipients:
+ lrekucki, georg.brandl |
2010-01-06 00:32:42 | lrekucki | set | messageid: <1262737962.32.0.137160455092.issue7641@psf.upfronthosting.co.za> |
2010-01-06 00:32:40 | lrekucki | link | issue7641 messages |
2010-01-06 00:32:39 | lrekucki | create | |
|