def get_invalid_tokens():
"""
Get a list of invalid tokens that can be used inside sfc_model equations.
:return: list
"""
internal = ['self', 'None']
kw = keyword.kwlist
if is_python_3:
built = dir(builtins)
else: # pragma: no cover
built = dir(__builtin__)
out = internal + kw + built
# Need to add back in some semi-mathematical operations
good_tokens = ('float', 'max', 'min', 'sum', 'pow', 'abs', 'round', 'pow')
out = (x for x in out if x not in good_tokens)
return list(out)
评论列表
文章目录