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

Function _convert_signed_num

tools/python-3.11.9-amd64/Lib/ast.py:76–83  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

74 _raise_malformed_node(node)
75 return node.value
76 def _convert_signed_num(node):
77 if isinstance(node, UnaryOp) and isinstance(node.op, (UAdd, USub)):
78 operand = _convert_num(node.operand)
79 if isinstance(node.op, UAdd):
80 return + operand
81 else:
82 return - operand
83 return _convert_num(node)
84 def _convert(node):
85 if isinstance(node, Constant):
86 return node.value

Callers 1

_convertFunction · 0.85

Calls 1

_convert_numFunction · 0.85

Tested by

no test coverage detected