3 ms·
I wonder if an autoformatter like black is at play here.
by jldugger 5y ago
I wonder if an autoformatter like black is at play here.
- saila 5y agoBlack doesn't split strings, and I doubt they'd choose to use concatenation if they did.
- hathawsh 5y agoI kind of wish Black would split and join literal strings. I've seen several times when Black converted code like this: raise SomeError( "Explanation... " "yet more explanation" ) To this: raise SomeError( "Explanation... " "yet more explanation" ) That just looks odd. Black is fantastic, but not perfect.
- d0mine 5y agoBlack does split strings if configured and it does use implicit concatenation of Python string literals.
- saila 5y agoThere's an experimental option for splitting long strings using the --preview flag, but it still seems to have some potential issues. That seems like it would be extremely hard to solve correctly.
- xigoi 5y agoBlack doesn't change the semantics of code.