Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if v_str == '(':
v_re = self.token
self._update_tokens(write_token)
assert self.token == ','
self._update_tokens(write_token)
v_im = self.token
self._update_tokens(write_token)
assert self.token == ')'
self._update_tokens(write_token, override)
v_str = '({0}, {1})'.format(v_re, v_im)
recast_funcs = [int, pyfloat, pycomplex, pybool, pystr]
for f90type in recast_funcs:
try:
# Unclever hack.. integrate this better
if f90type == pybool:
value = pybool(v_str, self.strict_logical)
else:
value = f90type(v_str)
return value
except ValueError:
continue