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

Class CustomStr

Lib/test/test_android.py:225–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223 # String subclasses are accepted, but they should be converted
224 # to a standard str without calling any of their methods.
225 class CustomStr(str):
226 def splitlines(self, *args, **kwargs):
227 raise AssertionError()
228
229 def __len__(self):
230 raise AssertionError()
231
232 def __str__(self):
233 raise AssertionError()
234
235 write(CustomStr("custom\n"), ["custom"], write_len=7)
236

Callers 1

test_strMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_strMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…