MCPcopy Index your code
hub / github.com/RustPython/RustPython / CustomFormat

Class CustomFormat

Lib/test/test_fstring.py:854–856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

852
853 def test_custom_format_specifier(self):
854 class CustomFormat:
855 def __format__(self, format_spec):
856 return format_spec
857
858 self.assertEqual(f'{CustomFormat():\n}', '\n')
859 self.assertEqual(f'{CustomFormat():\u2603}', '☃')

Callers 1

Calls

no outgoing calls

Tested by 1