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

Function _convert_num

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

Source from the content-addressed store, hash-verified

70 msg += f' on line {lno}'
71 raise ValueError(msg + f': {node!r}')
72 def _convert_num(node):
73 if not isinstance(node, Constant) or type(node.value) not in (int, float, complex):
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)

Callers 2

_convert_signed_numFunction · 0.85
_convertFunction · 0.85

Calls 2

_raise_malformed_nodeFunction · 0.85
typeClass · 0.50

Tested by

no test coverage detected