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


Groups > comp.lang.python > #25931

Re: the meaning of r’.......‘

References <CAEMsKDun53k2Kyk9TFT1kBxFB2zgp7rhA3W0LLPuS74+nbwiPA@mail.gmail.com> <CAPTjJmp=5_Pb4hEnjNc0vL8vUSo6OzMgvTHDQ9hS6N2zM=dxzA@mail.gmail.com> <jukefe$odj$1@dough.gmane.org>
Date 2012-07-24 07:49 +1000
Subject Re: the meaning of r’.......‘
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2506.1343080183.4697.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Jul 24, 2012 at 7:07 AM, Terry Reedy <tjreedy@udel.edu> wrote:
> On 7/23/2012 3:59 AM, Chris Angelico wrote:
>>
>> On Fri, Jul 20, 2012 at 5:56 PM, levi nie <levinie001@gmail.com> wrote:
>>>
>>> the meaning of r’.......‘?
>>
>>
>> It's a raw string.
>>
>> http://docs.python.org/py3k/tutorial/introduction.html#strings
>
> Strictly speaking, it is a raw string literal, which should be parsed as raw
> (string literal) and NOT as (raw string) literal. I know that the docs
> sometimes leave off 'literal', but that sometimes confuses people that there
> is such a thing as a raw string instance.

True, but then, the same elision is also seen in, for instance, 12345
being an "integer" not a "decimal integer literal". There's no
difference between 0x3039 and 12345, but if someone asked what the 0x
meant, I'd explain it as "hex literal".

Though you're right, it does cause some problems.

ChrisA

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


Thread

Re: the meaning of r’.......‘ Chris Angelico <rosuav@gmail.com> - 2012-07-24 07:49 +1000

csiph-web