-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Sage silently accepts symbolic expressions with two comparison operators #24726
Comments
comment:1
This is not a solvable problem. The problem is that Python treats
as
Since There is proposal at PEP 535 to fix this, but it's not clear whether it will be accepted. |
comment:3
I got your point, but it is not clear for me that this implies that there is nothing to do on the symbolic ring to mitigate the issue. |
comment:4
Replying to @sagetrac-tmonteil:
As long as |
comment:5
We could let the Sage preparser turn multiple inequalities in |
comment:6
That's an interesting idea. And it could raise an error outside assumptions. Let's at least wait for that PEP before closing this. |
comment:8
Replying to @slel:
Why special-case
|
comment:9
And if you do want to hack the preparser for that, I would do it with the PEP 535 semantics. |
comment:10
Since PEP 535 is not particularly likely to come soon, I suggest to close this as "wontfix". |
See the following example:
This should raise an error. Note that it can create confusion when used in assumptions:
This has been reported on this ask question.
CC: @rwst @slel
Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/24726
The text was updated successfully, but these errors were encountered: