mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
only recursively expand in the format spec (closes #17644)
This commit is contained in:
parent
36f74aa7f7
commit
d2b58a9880
3 changed files with 13 additions and 2 deletions
|
@ -934,6 +934,8 @@ class UnicodeTest(string_tests.CommonTest,
|
|||
self.assertEqual("{0:.0s}".format("ABC\u0410\u0411\u0412"),
|
||||
'')
|
||||
|
||||
self.assertEqual("{[{}]}".format({"{}": 5}), "5")
|
||||
|
||||
def test_format_map(self):
|
||||
self.assertEqual(''.format_map({}), '')
|
||||
self.assertEqual('a'.format_map({}), 'a')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue