MCPcopy Index your code
hub / github.com/RustPython/RustPython / source_to_code

Method source_to_code

Lib/importlib/_bootstrap_external.py:818–824  ·  view source on GitHub ↗

Return the code object compiled from source. The 'data' argument can be any object type that compile() supports.

(self, data, path, *, _optimize=-1)

Source from the content-addressed store, hash-verified

816 return decode_source(source_bytes)
817
818 def source_to_code(self, data, path, *, _optimize=-1):
819 """Return the code object compiled from source.
820
821 The 'data' argument can be any object type that compile() supports.
822 """
823 return _bootstrap._call_with_frames_removed(compile, data, path, 'exec',
824 dont_inherit=True, optimize=_optimize)
825
826 def get_code(self, fullname):
827 """Concrete implementation of InspectLoader.get_code.

Callers 1

get_codeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected