MCPcopy Create free account
hub / github.com/simplejson/simplejson / MisbehavingBytesSubtype

Class MisbehavingBytesSubtype

simplejson/tests/test_dump.py:10–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8 return "FAIL!"
9
10class MisbehavingBytesSubtype(binary_type):
11 def decode(self, encoding=None):
12 return "bad decode"
13 def __str__(self):
14 return "bad __str__"
15 def __bytes__(self):
16 return b("bad __bytes__")
17
18def as_text_type(s):
19 if PY3 and isinstance(s, bytes):

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…