mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix for bug #438164: %-formatting using Unicode objects.
This patch also does away with an incompatibility between Jython and CPython.
This commit is contained in:
parent
0c4d8d05a8
commit
72f8213ba4
2 changed files with 5 additions and 4 deletions
|
@ -362,10 +362,7 @@ if sys.platform[:4] != 'java':
|
|||
|
||||
verify(u"%(x)s, %(y)s" % {'x':u"abc", 'y':"def"} == u'abc, def')
|
||||
try:
|
||||
if sys.platform[:4] != 'java':
|
||||
value = u"%(x)s, %(ä)s" % {'x':u"abc", u'ä'.encode('utf-8'):"def"}
|
||||
else:
|
||||
value = u"%(x)s, %(ä)s" % {'x':u"abc", u'ä':"def"}
|
||||
value = u"%(x)s, %(ä)s" % {'x':u"abc", u'ä':"def"}
|
||||
except KeyError:
|
||||
print '*** formatting failed for "%s"' % "u'abc, def'"
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue