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

Class D

Lib/test/test_str.py:1109–1113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1107 return spec
1108
1109 class D:
1110 def __init__(self, x):
1111 self.x = x
1112 def __format__(self, spec):
1113 return str(self.x)
1114
1115 # class with __str__, but no __format__
1116 class E:

Callers 1

test_formatMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_formatMethod · 0.56