Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

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

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


tjreedy at udel

Jul 23, 2012, 2:07 PM

Post #1 of 2 (140 views)
Permalink
Re: the meaning of r’.......‘

On 7/23/2012 3:59 AM, Chris Angelico wrote:
> On Fri, Jul 20, 2012 at 5:56 PM, levi nie <levinie001 [at] gmail> 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.

--
Terry Jan Reedy




--
http://mail.python.org/mailman/listinfo/python-list


rosuav at gmail

Jul 23, 2012, 2:49 PM

Post #2 of 2 (126 views)
Permalink
Re: the meaning of r....... [In reply to]

On Tue, Jul 24, 2012 at 7:07 AM, Terry Reedy <tjreedy [at] udel> wrote:
> On 7/23/2012 3:59 AM, Chris Angelico wrote:
>>
>> On Fri, Jul 20, 2012 at 5:56 PM, levi nie <levinie001 [at] gmail> 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
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.