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

Function make_pyc

Lib/test/test_zipimport.py:39–44  ·  view source on GitHub ↗
(co, mtime, size)

Source from the content-addressed store, hash-verified

37raise_src = 'def do_raise(): raise TypeError\n'
38
39def make_pyc(co, mtime, size):
40 data = marshal.dumps(co)
41 pyc = (importlib.util.MAGIC_NUMBER +
42 struct.pack("<iLL", 0,
43 int(mtime) & 0xFFFF_FFFF, size & 0xFFFF_FFFF) + data)
44 return pyc
45
46def module_path_to_dotted_name(path):
47 return path.replace(os.sep, '.')

Callers 4

test_zipimport.pyFile · 0.85
test2038MTimeMethod · 0.85
testImporterAttrMethod · 0.85
testGetCompiledSourceMethod · 0.85

Calls 2

dumpsMethod · 0.45
packMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…