| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d10e335 commit 5617a43
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -139,7 +139,8 @@ def _convert(node): | |||
| 139 | 139 | left = _convert(node.left) | |
| 140 | 140 | right = _convert(node.right) | |
| 141 | 141 | if not ( | |
| 142 | - type(left) in _numeric_types and type(right) in _numeric_types | ||
| 142 | + isinstance(left, _numeric_types) | ||
| 143 | + and isinstance(right, _numeric_types) | ||
| 143 | 144 | ): | |
| 144 | 145 | raise ValueError("binary + and - only allowed on builtin nums") | |
| 145 | 146 | if isinstance(node.op, ast.Add): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments