def _(item, body=None, top=False):
if top and len(item.args) != 0:
if isinstance(item.args[0], _ast.Call):
_transform(item.args[0], body=body, top=top)
if not isinstance(item.args[0], (_ast.Name, _ast.Num)):
syntax = ast.parse('tmpcall{} = b'.format(randint(0, 2**32))).body[0]
syntax.value = item.args[0]
item.args[0] = syntax.targets[0]
body.extend((syntax, item))
return True
return False
评论列表
文章目录