Message170551
Expected behavior of string.Formatter() is to return unicode strings for unicode templates, and "byte" strings for str templates. Which is exactly what it does, with one frustrating exception: for empty unicode string it returns byte str. Test follows:
import string
template = u""
result = string.Formatter().format(template)
assert isinstance(result, unicode)
# AssertionError |
|
Date |
User |
Action |
Args |
2012-09-16 11:55:56 | Aleksey.Sivokon | set | recipients:
+ Aleksey.Sivokon |
2012-09-16 11:55:56 | Aleksey.Sivokon | set | messageid: <1347796556.49.0.9624827569.issue15951@psf.upfronthosting.co.za> |
2012-09-16 11:55:56 | Aleksey.Sivokon | link | issue15951 messages |
2012-09-16 11:55:55 | Aleksey.Sivokon | create | |
|