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

Method _from_raw

Tools/c-analyzer/c_parser/info.py:34–44  ·  view source on GitHub ↗
(cls, raw)

Source from the content-addressed store, hash-verified

32
33 @classonly
34 def _from_raw(cls, raw):
35 if raw is None:
36 return None
37 elif isinstance(raw, cls):
38 return raw
39 elif type(raw) is str:
40 # We could use cls[raw] for the upper-case form,
41 # but there's no need to go to the trouble.
42 return cls(raw.lower())
43 else:
44 raise NotImplementedError(raw)
45
46 @classonly
47 def by_priority(cls, group=None):

Callers 2

_from_rowMethod · 0.80
resolveMethod · 0.80

Calls 2

clsClass · 0.50
lowerMethod · 0.45

Tested by

no test coverage detected