Change String Concatenation from Backslash to Parentheses

已回答

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

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

请先登录再写评论。