Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in comparison #797

Open
mmatera opened this issue Feb 22, 2023 · 0 comments · May be fixed by #975
Open

Exception in comparison #797

mmatera opened this issue Feb 22, 2023 · 0 comments · May be fixed by #975

Comments

@mmatera
Copy link
Contributor

mmatera commented Feb 22, 2023

Description

Wo["x"]>0 raises an exception:

File "mathics-core/mathics/builtin/testing_expressions/equality_inequality.py", line 94, in eval
    c = do_cmp(x, y)
  File "mathics-core/mathics/eval/testing_expressions.py", line 32, in do_cmp
    if s1.is_Float and s2.is_Float:
AttributeError: 'NoneType' object has no attribute 'is_Float'

This seems to happen only if one of the arguments is a String. For example,

  • Wo[3]>0
  • Wo[f[x]]>0

stays unevaluated, but

  • Wo[3, "x"]>0
  • Wo[f["x"]]>0

raise the exception.

mmatera added a commit that referenced this issue Jan 23, 2024
@mmatera mmatera linked a pull request Jan 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant