Re:New string formatting in Python
by scrollaway on Sunday January 03, 2016 @07:32PM
(#10833361)
You don't have to use + to join strings on multiple lines. Here:
>>> (" foo "
... "bar.")
' foo bar.'The other day I spent some time tracking down a bug where someone forgot a trailing comma in a multi-line parameter list.
That was annoying.
Ok, but this only works for literals.
Re:New string formatting in Python
by scrollaway on Monday January 04, 2016 @04:48AM
(#10834718)
Yes, which is what I'm replying to.
I am not sure why i18n is a big deal, let another library deal with it.
Whatever, I have the choice not using this feature after it is accepted and implemented. Their PEP discussion on email always ended up in tangential. Problem I always have with string manipulation is dealing with long string, which for coding style I'd split into multiple +, and thus using format is pretty ugly.