好久没更了啊~

由于某些奇怪的需要嘛,需要生成一个code对象,找了半天发现还是得用google大法才能找到

code = types.CodeType(
    co.co_argcount,
    co.co_nlocals,
    co.co_stacksize,
    co.co_flags,
    co.co_code,
    co.co_consts,
    co.co_names,
    co.co_varnames,
    co.co_filename,
    co.co_name,
    co.co_firstlineno,
    co.co_lnotab
)
#types.CodeType(argcount, nlocals, stacksize, flags, codestring, constants, names,varnames, filename, name, firstlineno, lnotab[, freevars[, cellvars]])