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

Class InternalMapping

Lib/test/test_str.py:1425–1429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1423 self.assertEqual('{a} {world}'.format_map(Mapping(a='hello')), 'hello world')
1424
1425 class InternalMapping:
1426 def __init__(self):
1427 self.mapping = {'a': 'hello'}
1428 def __getitem__(self, key):
1429 return self.mapping[key]
1430 self.assertEqual('{a}'.format_map(InternalMapping()), 'hello')
1431
1432

Callers 1

test_format_mapMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_format_mapMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…