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

Method from_raw

Lib/test/test__interpchannels.py:78–84  ·  view source on GitHub ↗
(cls, raw)

Source from the content-addressed store, hash-verified

76
77 @classmethod
78 def from_raw(cls, raw):
79 if isinstance(raw, cls):
80 return raw
81 elif isinstance(raw, str):
82 return cls(raw)
83 else:
84 raise NotImplementedError
85
86 def __new__(cls, name=None, id=None):
87 main, *_ = _interpreters.get_main()

Callers 1

__new__Method · 0.45

Calls 1

clsClass · 0.50

Tested by

no test coverage detected