Build an assignment statement
(target, source)
| 23 | return Leaf(token.RPAR, ")") |
| 24 | |
| 25 | def Assign(target, source): |
| 26 | """Build an assignment statement""" |
| 27 | if not isinstance(target, list): |
| 28 | target = [target] |
| 29 | if not isinstance(source, list): |
| 30 | source.prefix = " " |
| 31 | source = [source] |
| 32 | |
| 33 | return Node(syms.atom, |
| 34 | target + [Leaf(token.EQUAL, "=", prefix=" ")] + source) |
| 35 | |
| 36 | def Name(name, prefix=None): |
| 37 | """Return a NAME leaf""" |
no test coverage detected