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

Regression caused by cd263b3853482226dbffe99486ff98c8445d6a63 #1151

Closed
alexvong243f opened this issue Jun 24, 2022 · 2 comments · Fixed by #1153
Closed

Regression caused by cd263b3853482226dbffe99486ff98c8445d6a63 #1151

alexvong243f opened this issue Jun 24, 2022 · 2 comments · Fixed by #1153
Labels
Milestone

Comments

@alexvong243f
Copy link
Collaborator

I realize cd263b3 causes a regression because in the following code:

     elseif (isequal (x, []))
      var_pyobj.append (py.list ());

If x is '', we have isequal ('', []) being evaluated to true which is not what we want.

See also the discussion in #1136.

@alexvong243f alexvong243f added this to the 3.0.0 milestone Jun 24, 2022
@cbm755 cbm755 added the bug label Jun 25, 2022
@cbm755
Copy link
Collaborator

cbm755 commented Jun 25, 2022

Is there a particular thing that fails b/c of this? Something like a = pycall_sympy__('return _ins[0]', "")? Or sym('')?

Must be something missing from the test suite anyway: so when we fix this we should add something to the BIST.

@alexvong243f
Copy link
Collaborator Author

Due to this bug,

pycall_sympy__ ('sys.stderr.write(repr(_ins[0]) + "\n")', '');

prints [] rather than ''.

Basically, the empty string turns into the empty list in Python, which is incorrect and different from the old behaviour.

alexvong243f pushed a commit to alexvong243f/octsympy that referenced this issue Jun 25, 2022
...casued by cd263b3.

Closes gnu-octave#1151.

* inst/private/store_vars_in_python.m: Update it.
* inst/pycall_sympy__.m: Add test accordingly.
alexvong243f pushed a commit to alexvong243f/octsympy that referenced this issue Jun 25, 2022
...caused by cd263b3.

Closes gnu-octave#1151.

* inst/private/store_vars_in_python.m: Update it.
* inst/pycall_sympy__.m: Add test accordingly.
alexvong243f pushed a commit to alexvong243f/octsympy that referenced this issue Jun 25, 2022
...caused by cd263b3.

Closes gnu-octave#1151.

* inst/private/store_vars_in_python.m: Update it.
* inst/pycall_sympy__.m: Add test accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants