MCPcopy Index your code
hub / github.com/python/cpython / Mapping

Class Mapping

Lib/test/test_str.py:1419–1421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1417
1418 # using mappings
1419 class Mapping(dict):
1420 def __missing__(self, key):
1421 return key
1422 self.assertEqual('{hello}'.format_map(Mapping()), 'hello')
1423 self.assertEqual('{a} {world}'.format_map(Mapping(a='hello')), 'hello world')
1424

Callers 1

test_format_mapMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_format_mapMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…