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

Class C

Lib/test/test_fstring.py:1624–1628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1622
1623 # Make sure __format__ is being called.
1624 class C:
1625 def __format__(self, s):
1626 return f'FORMAT-{s}'
1627 def __repr__(self):
1628 return 'REPR'
1629
1630 self.assertEqual(f'{C()=}', 'C()=REPR')
1631 self.assertEqual(f'{C()=!r}', 'C()=REPR')

Callers 1

test_debug_conversionMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_debug_conversionMethod · 0.56