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

Class CustomStr

Lib/test/test_apple.py:110–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108 # String subclasses are accepted, but they should be converted
109 # to a standard str without calling any of their methods.
110 class CustomStr(str):
111 def splitlines(self, *args, **kwargs):
112 raise AssertionError()
113
114 def __len__(self):
115 raise AssertionError()
116
117 def __str__(self):
118 raise AssertionError()
119
120 self.log.write(CustomStr("custom\n"))
121 self.assert_writes([b"custom\n"])

Callers 1

test_nonstandard_strMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_nonstandard_strMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…