Change String Concatenation from Backslash to Parentheses

Answered

Currently, in Pycharm, when I reach the end of a line in the middle of a string literal, a backslash is added and a new string is started on the next line.

Is it possible to change the settings so that Pycharm instead uses the implicit string concatenation method? I'd like so that parentheses are added before and after the two string literals, implying that they are concatenated when they are compiled. 

e.g.:

Instead of

"Hello, this is a long" \

"line that I wrote"

 

I want:

("Hello, this is a long"

"line that I wrote")

3
1 comment

Unfortunately, it's not possible yet. Please vote for https://youtrack.jetbrains.com/issue/PY-17193 to increase its priority and be notified about updates.

1

Please sign in to leave a comment.