Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31666

Re: A desperate lunge for on-topic-ness

Date 2012-10-18 13:09 -0400
From Dave Angel <d@davea.name>
Subject Re: A desperate lunge for on-topic-ness
References <CANaSqUfLX7V2OxhO+fdVtmQcDzNfEgQfutHak_G-9_1_4nNr1Q@mail.gmail.com> <50802B5B.6040902@cs.wisc.edu> <CAPTjJmqGmYHD7vTdWdSq-Ro4ZCv2z=3zea92iahy-7Qx4=NoOg@mail.gmail.com> <508032B4.5040303@davea.name> <CALvWhxtd7Ym+Pspx+=4tVUazj8ZO8Zhz_T9USuLEGLPg1HRjWQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2456.1350580204.27098.python-list@python.org> (permalink)

Show all headers | View raw


On 10/18/2012 12:58 PM, Chris Kaynor wrote:
> On Thu, Oct 18, 2012 at 9:47 AM, Dave Angel <d@davea.name> wrote:
>
>> <SNIP>
>> But both C++ and Python have automatic concatenation of adjacent
>> strings.  So you can just start and end each line with a quote, and
>> leave off the backslash.
>>
> That will work in C++ as the statements won't terminate on new-line (only
> on semi-colon), however in Python that won't work as the statement
> will terminate at the end of the line. You can get around this by wrapping
> the multiple strings inside of parentheses.
>
>

You're right of course.  As it happens, i tested my "remembery" with a
function call (print, in Python 3) , so I already had the parens.

-- 

DaveA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: A desperate lunge for on-topic-ness Dave Angel <d@davea.name> - 2012-10-18 13:09 -0400

csiph-web