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
This concatenation style is valid and commonly use for multiline strings.
x = ( "foo" "bar" ) print x
output:
foobar
However it breaks when a variable interpolation is added:
# coding: interpy a = 5 x = ( "foo #{a}" "bar" ) print x
File "test.py", line 6 "bar" ^ SyntaxError: invalid syntax
I expected the output:
foo5bar
The text was updated successfully, but these errors were encountered:
Since the bytecode generation converts the interpolation to addition, this would certainly seem to fail.
The code above is converted to:
x = ( "foo " + str(a) "bar" )
This sounds like a very common pitfall.
Sorry, something went wrong.
@prashnts I would agree. I stopped using the library for that reason.
No branches or pull requests
This concatenation style is valid and commonly use for multiline strings.
output:
However it breaks when a variable interpolation is added:
output:
I expected the output:
The text was updated successfully, but these errors were encountered: