(code, source_hash, checked=True)
return data
Produce the data for a hash-based pyc.
Produce the data for a hash-based pyc.
Produce the data for a hash - based pyc .
def _code_to_hash_pyc(code, source_hash, checked=True):
    "Produce the data for a hash-based pyc."
    data = bytearray(MAGIC_NUMBER)
    flags = 0b1 | checked << 1
    data.extend(_pack_uint32(flags))
    assert len(source_hash) == 8
    data.extend(source_hash)
    data.extend(marshal.dumps(code))
    return data
def _code_to_hash_pyc ( code , source_hash , checked = True ) : data = bytearray ( MAGIC_NUMBER ) flags = 0b1 | checked << 1 data . extend ( _pack_uint32 ( flags ) ) assert len ( source_hash ) == 8 data . extend ( source_hash ) data . extend ( marshal . dumps ( code ) ) return data