MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / Assign

Function Assign

tools/python-3.11.9-amd64/Lib/lib2to3/fixer_util.py:25–34  ·  view source on GitHub ↗

Build an assignment statement

(target, source)

Source from the content-addressed store, hash-verified

23 return Leaf(token.RPAR, ")")
24
25def 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
36def Name(name, prefix=None):
37 """Return a NAME leaf"""

Callers 2

handle_tupleMethod · 0.85
transformMethod · 0.85

Calls 2

LeafClass · 0.85
NodeClass · 0.70

Tested by

no test coverage detected