MCPcopy Create free account
hub / github.com/RustPython/RustPython / InternalMapping

Class InternalMapping

Lib/test/test_str.py:1423–1427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

test_format_mapMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_format_mapMethod · 0.68