Message214132
Or:
"{:{:s}{:d}s}".format(str(self.pcs), self.format_align, self.max_length)
You're trying to apply the string format specifier (the stuff after the first colon through the final "s", as expanded) to an object that's not always a string: sometimes it's None. So you need to use one of the two supported ways to convert it to a string. Either str() or !s.
str.format() is very much dependent on the types of its arguments: the format specifier needs to be understood by the object being formatted. Similarly, you couldn't pass in a datetime and expect that to work, either. |
|
Date |
User |
Action |
Args |
2014-03-19 20:30:56 | eric.smith | set | recipients:
+ eric.smith, mark.dickinson, ezio.melotti, r.david.murray, flox, meador.inge, python-dev, hct |
2014-03-19 20:30:56 | eric.smith | set | messageid: <1395261056.89.0.999212235066.issue7994@psf.upfronthosting.co.za> |
2014-03-19 20:30:56 | eric.smith | link | issue7994 messages |
2014-03-19 20:30:56 | eric.smith | create | |
|