Message123684
Hexadecimals can be formatted to lower and uppercase:
>>> '{0:x}'.format(123)
'7b'
>>> '{0:X}'.format(123)
'7B'
I would like the same thing for strings:
>>> '{0.lastname:u} {0.firstname}'.format(user)
'DOE John'
I first thought using "S" for uppercase, but "s" is not available for lowercase. So I thought about "u" and "l".
The alternative is to write:
>>> '{0} {1}'.format(user.lastname.upper(), user.firstname)
'DOE John'
But I find it less compact and elegant. |
|
Date |
User |
Action |
Args |
2010-12-09 15:33:43 | Hervé Cauwelier | set | recipients:
+ Hervé Cauwelier |
2010-12-09 15:33:42 | Hervé Cauwelier | set | messageid: <1291908822.96.0.536076178004.issue10660@psf.upfronthosting.co.za> |
2010-12-09 15:33:41 | Hervé Cauwelier | link | issue10660 messages |
2010-12-09 15:33:41 | Hervé Cauwelier | create | |
|