[Python-ideas] Implicit string literal concatenation considered harmful?

Joao S. O. Bueno jsbueno at python.org.br
Sat May 11 04:13:54 CEST 2013


Any chance that along with that there could come up a syntax for
 ignoring identation space inside multiline strings
along wih this deprecation?

Think something along:

logger.warn(I'''C: 'Ello, Miss?
                    Owner: What do you mean "miss"?
                    C: I'm sorry, I have a cold. I wish to make a complaint!
                    O: We're closin' for lunch.
                    C: Never mind that, my lad. I wish to complain about this
                    parrot what I purchased not half an hour ago from
this very boutique.\
                    ''')

Against:

logger.warn( 'Owner: What do you mean "miss"?\n' +
                     'C: I'm sorry, I have a cold. I wish to make a
complaint!\n' +
                     'O: We're closin\' for lunch.\n' +
                     'C: Never mind that, my lad. I wish to complain
about this\n' +
                     'parrot what I purchased not half an hour ago
from this very boutique.\n'
                    )

I know this sugestion has come and gone before - but it still looks
like a good idea for me
- there is no ambiguity there - you either punch enough spaces to get
your content aligned
with the " i''' "in the first line, or get a SyntaxError.



More information about the Python-ideas mailing list