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

Function _raise_malformed_node

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

Source from the content-addressed store, hash-verified

65 if isinstance(node_or_string, Expression):
66 node_or_string = node_or_string.body
67 def _raise_malformed_node(node):
68 msg = "malformed node or string"
69 if lno := getattr(node, 'lineno', None):
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)

Callers 2

_convert_numFunction · 0.85
_convertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected