We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have an iPython notebook and I can specify cython macros fine with something like
# distutils: define_macros=NAME=VALUE
but now I want to pass VALUE as a string "VALUE"
VALUE
"VALUE"
# distutils: define_macros=NAME="VALUE"
It IS passing a string, but it's passing "__Pyx_L1_".
"__Pyx_L1_"
I tried 'VALUE' and \"VALUE\" but they give compile errors because ' is for a character and \ becomes a "stray".
'VALUE'
\"VALUE\"
'
\
I expect the macro NAME to be set to "VALUE"
NAME
OS: [e.g. Linux, Windows, macOS] Linux Python version [e.g. 3.10.2] 3.10.6 Cython version [e.g. 3.0.0a11] 3.0.0a11
https://stackoverflow.com/questions/75066010/string-in-define-macro-in-cython-in-notebook#comment132470048_75066010
@realead made me do it
The text was updated successfully, but these errors were encountered:
can't attach the notebook but here is my test
Sorry, something went wrong.
No branches or pull requests
Describe the bug
I have an iPython notebook and I can specify cython macros fine with something like
but now I want to pass
VALUE
as a string"VALUE"
It IS passing a string, but it's passing
"__Pyx_L1_"
.I tried
'VALUE'
and\"VALUE\"
but they give compile errors because'
is for a character and\
becomes a "stray".Code to reproduce the behaviour:
# distutils: define_macros=NAME="VALUE"
Expected behaviour
I expect the macro
NAME
to be set to"VALUE"
Environment
OS: [e.g. Linux, Windows, macOS] Linux
Python version [e.g. 3.10.2] 3.10.6
Cython version [e.g. 3.0.0a11] 3.0.0a11
Additional context
https://stackoverflow.com/questions/75066010/string-in-define-macro-in-cython-in-notebook#comment132470048_75066010
@realead made me do it
The text was updated successfully, but these errors were encountered: