We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d10e335 commit 5617a43Copy full SHA for 5617a43
bpython/simpleeval.py
@@ -139,7 +139,8 @@ def _convert(node):
139
left = _convert(node.left)
140
right = _convert(node.right)
141
if not (
142
- type(left) in _numeric_types and type(right) in _numeric_types
+ isinstance(left, _numeric_types)
143
+ and isinstance(right, _numeric_types)
144
):
145
raise ValueError("binary + and - only allowed on builtin nums")
146
if isinstance(node.op, ast.Add):
0 commit comments