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
The provided code snippet behaves differently depending on if it is run in python or converted to cython code and run there. I was not able to figure out what exactly is causing the changed behaviour.
I am aware that the code can be simplified with zip, but would still be interested in knowing what exactly is causing this.
when run in python and cython, it should print [[1, 'a'], [2, 'b'], [3, 'c']]. Instead, it only prints the result in python, in cython it prints [['a', 'a'], ['b', 'b'], ['c', 'c']] instead.
Environment
OS: macOS
Python version 3.9.13
Cython version 0.29.28
Additional context
No response
The text was updated successfully, but these errors were encountered:
Chrisenvel
changed the title
[BUG] expression returns wrong result when converted to cython code
[BUG] generator expression returns wrong result when converted to cython code
Feb 17, 2023
Describe the bug
The provided code snippet behaves differently depending on if it is run in python or converted to cython code and run there. I was not able to figure out what exactly is causing the changed behaviour.
I am aware that the code can be simplified with
zip
, but would still be interested in knowing what exactly is causing this.Code to reproduce the behaviour:
Expected behaviour
when run in python and cython, it should print
[[1, 'a'], [2, 'b'], [3, 'c']
]. Instead, it only prints the result in python, in cython it prints[['a', 'a'], ['b', 'b'], ['c', 'c']]
instead.Environment
OS: macOS
Python version 3.9.13
Cython version 0.29.28
Additional context
No response
The text was updated successfully, but these errors were encountered: