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

Method __setstate__

Lib/test/test_io/test_textio.py:1398–1400  ·  view source on GitHub ↗
(slf, state)

Source from the content-addressed store, hash-verified

1396 def __getstate__(self):
1397 return self.tag, self.buffer.getvalue()
1398 def __setstate__(slf, state):
1399 tag, value = state
1400 slf.__init__(self.BytesIO(value), tag)
1401
1402 raw = self.BytesIO(b'data')
1403 txt = MyTextIO(raw, 'ham')

Callers 6

test_issue31311Method · 0.45
setstateMethod · 0.45
test_setstateMethod · 0.45
mutationMethod · 0.45
test_setstateMethod · 0.45

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected