Commit 20a00e22 authored by Ask Hjorth Larsen's avatar Ask Hjorth Larsen

fix handling of complex numbers

parent 070cf0d4
......@@ -344,8 +344,14 @@ class OctNamespace:
continue
v = self.evaluate(token)
try:
v = float(v)
except TypeError:
try:
v = complex(v)
except ValueError:
break
except ValueError:
break # Cannot evaluate expression
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment