You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I tried to reproduce the same tests in the documentation, but I was unable to reproduce a formula using Some with a match statement. I imagine that the formulas presented in the documentation work, but this one does not.
The exists() function above corresponds to what the documentation claims to work using Some.
Expected behavior
The behavior expected would be that the test would be OK, because test1 is an integer with the value 100, that with the keep_positive function is transformed into Some(100), that in the exists function should return True.
Code or Screenshots
This is the actual return of the test above I am obtaining:
However, I believe that those alternatives defeat the purpose of using match statements to unpack Option values when the match statement is more complex (such as matching with specific values). It seems that the syntax in the documentation is more pythonic, and should work.
OS: Windows with WSL
Expression version 5.3.0
Python version 3.12.2
The text was updated successfully, but these errors were encountered:
Describe the bug
I tried to reproduce the same tests in the documentation, but I was unable to reproduce a formula using Some with a match statement. I imagine that the formulas presented in the documentation work, but this one does not.
To Reproduce
Steps to reproduce the behavior:
exists
function:The
exists()
function above corresponds to what the documentation claims to work using Some.Expected behavior
The behavior expected would be that the test would be OK, because test1 is an integer with the value 100, that with the keep_positive function is transformed into Some(100), that in the exists function should return True.
Code or Screenshots
This is the actual return of the test above I am obtaining:
Additional context
I am able to refactor the exists() function in two ways to make the test pass:
and
However, I believe that those alternatives defeat the purpose of using match statements to unpack Option values when the match statement is more complex (such as matching with specific values). It seems that the syntax in the documentation is more pythonic, and should work.
The text was updated successfully, but these errors were encountered: