mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Marc-Andre Lemburg <mal@lemburg.com>:
Updated to the fix in %c formatting: it now always checks for a one character argument.
This commit is contained in:
parent
2348114ba8
commit
59a044b7d2
1 changed files with 2 additions and 2 deletions
|
@ -247,8 +247,8 @@ assert u"%s, %s, %i, %f, %5.2f" % (u"abc", "abc", 1, -2, 3) == u'abc, abc, 1, -2
|
|||
assert u"%s, %s, %i, %f, %5.2f" % (u"abc", "abc", -1, -2, 3.5) == u'abc, abc, -1, -2.000000, 3.50'
|
||||
assert u"%s, %s, %i, %f, %5.2f" % (u"abc", "abc", -1, -2, 3.57) == u'abc, abc, -1, -2.000000, 3.57'
|
||||
assert u"%s, %s, %i, %f, %5.2f" % (u"abc", "abc", -1, -2, 1003.57) == u'abc, abc, -1, -2.000000, 1003.57'
|
||||
assert u"%c" % (u"abc",) == u'a'
|
||||
assert u"%c" % ("abc",) == u'a'
|
||||
assert u"%c" % (u"a",) == u'a'
|
||||
assert u"%c" % ("a",) == u'a'
|
||||
assert u"%c" % (34,) == u'"'
|
||||
assert u"%c" % (36,) == u'$'
|
||||
assert u"%r, %r" % (u"abc", "abc") == u"u'abc', 'abc'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue