Bengt Richter wrote:
I never liked any of the solutions that demand bracketing the string with
expression brackets,
but I just had an idea ;-)
Or for an even more twisted idea:
from textwrap import dedent
class _Dedent(type):
def __new__(cls, name, bases, dict):
if name == "*": # fo
I sometimes use the implicit literal string concatenation:
def SomeFunction():
if SomeCondition:
MyString = 'The quick brown fox ' \
'jumped over the ' \
'lazy dog'
print MyString
SomeFunction()
The quick brown fox jumped over the lazy dog
It loo
On Thu, 14 Apr 2005 02:43:40 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote:
>On Thursday 14 April 2005 02:03 am, Dan wrote:
>> If you use triple quotes to define a string, then the newlines are
>> implicitly included. This is a very nice feature. But if you're
>> inside a function or statement,
On Thursday 14 April 2005 02:03 am, Dan wrote:
> If you use triple quotes to define a string, then the newlines are
> implicitly included. This is a very nice feature. But if you're
> inside a function or statement, then you'll want the string to be
> positioned along that indentation. And the c
I've just begun playing with Python, and so far I like what I see.
It's a very elegant language. But I've found something that's, well,
a bit ugly. Maybe someone can point out to me where I'm wrong.
If you use triple quotes to define a string, then the newlines are
implicitly included. This is