PPysolate SpineREAD THE CODE · UNDERSTAND THE SYSTEM
课程与章节
源码索引 / CURRENT IMPLEMENTATION

docs/deep/examples/ast/branch_false/before.ast.txt

36 行 · 点击行号可定位;函数链接随声明位置更新,不手填行号。

Module(
  body=[
    If(
      test=Subscript(
        value=Name(id='inputs', ctx=Load()),
        slice=Constant(value='yes'),
        ctx=Load()),
      body=[
        Assign(
          targets=[
            Name(id='a', ctx=Store())],
          value=Call(
            func=Name(id='tool', ctx=Load()),
            args=[
              Constant(value='lookup')],
            keywords=[
              keyword(
                arg='key',
                value=Constant(value='book'))]))],
      orelse=[
        Assign(
          targets=[
            Name(id='a', ctx=Store())],
          value=Call(
            func=Name(id='tool', ctx=Load()),
            args=[
              Constant(value='lookup')],
            keywords=[
              keyword(
                arg='key',
                value=Constant(value='shipping'))]))]),
    Assign(
      targets=[
        Name(id='result', ctx=Store())],
      value=Name(id='a', ctx=Load()))],
  type_ignores=[])