-
-
Notifications
You must be signed in to change notification settings - Fork 559
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
Disallow boolean operations with Unknown #24345
Comments
Commit: |
Author: Ralf Stephan |
comment:3
I'm not sure that there is actually a bug here... To me, requiring people to write |
comment:4
Replying to @jdemeyer:
So you would not argue against a ticket that uses such an Unknown? |
comment:5
Replying to @jdemeyer:
Another alternative with this ticket's |
comment:6
Sorry, I'm not quite following what you are trying to say... Maybe you should explain better which bug this ticket is meant to address any why it is a bug. |
comment:7
The bug is that the flag query functions is_integer, is_real etc return False instead of Unknown, ie #22162. I followed your argument there that using Unknown as is would win nothing, although I think it would be less confusing. This ticket tries to implement an Unknown that behaves more like what we want. Can we agree on this? Have I misunderstood something? |
comment:8
Also after the flag query functions return unknown changes can be made that make them return True/Unknown/False where False really means False. |
comment:10
I definitely support the changes from this ticket. |
This comment has been minimized.
This comment has been minimized.
comment:12
In an ideal world, we would have the following behavior
It would be so much better to patch Python! |
comment:13
one doctest failure (see patchbot report)
|
Dependencies: #24513 |
comment:16
From the documentation of
Hence, the
There is indeed a bug in the design code (see #24513)
|
Changed branch from u/rws/disallow_boolean_operations_with_unknown to u/rws/24345 |
comment:35
PEP 335 was rejected, so can we please stop pretending that it will eventually be accepted? In other words: remove all references to PEP 335. |
comment:36
For reference, here is the implementation for
|
comment:37
OK, now I get it. The members |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:40
Replying to @rwst:
Note that the operators |
comment:41
And since we are at refactoring, I don't understand why |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed dependencies from #24513 to none |
Changed branch from u/rws/24345-1 to public/24345 |
comment:44
rebased New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed branch from public/24345 to |
The
Unknown
frommisc/unknown.py
incorrectly behaves likeFalse
in the context of boolean operations. It is mostly useless as long as Python has no tristate conditionals and logic operators. This ticket raises an error instead.As a consequence of this modification, Sage code is adapted as follows for a given tristate
troolean
Component: misc
Author: Ralf Stephan
Branch/Commit:
96fd7a2
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/24345
The text was updated successfully, but these errors were encountered: