[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Basic question

Guilherme Polo

2/13/2008 12:48:00 PM

2008/2/13, WILLIAM SCHMIDT <WSCHMIDT@colsa.com>:
> In several places in the Python documentation I have run across an extra "r" that I can not explain:
>
>
> *****************************
> In sys.path after the open bracket:
> sys.path = [r'd:\temp']
>
> In the on line help in the DATA section (towards the end):
>
> >>> help('sys')
> Help on built-in module sys:
>
> ~~~~ truncated ~~~~
>
> DATA
> exec_prefix = r'C:\Python25'
> executable = r'C:\Python25\pythonw.exe'
> path = [r'C:\Python25\Lib\idlelib', r'C:\Python25\python25.zip', r'C:\...
> prefix = r'C:\Python25'
> version = '2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bi...
> *****************************
>
> Can someone explain what that "r" is doing and where I would find it in the documentation?
>
> Thank you in advance for your assistance.
>
> William T. Schmidt
>
>
>
>
> --
> http://mail.python.org/mailman/listinfo/p...
>

"r" is a string literal indicating that a raw string follows. You can
read about it and more here: http://docs.python.org/ref/st...

--
-- Guilherme H. Polo Goncalves
2 Answers

mr.rapidan

11/16/2011 3:27:00 PM

0

One has not truly lived until one has eaten basashi from the very horse one is riding, while galloping into the surf off Mizushima Beach. <knuckles with steve>

3jane.

11/16/2011 3:41:00 PM

0

On Nov 16, 10:26 am, "dr.narcolepsy" <jmi...@gmail.com> wrote:
> One has not truly lived until one has eaten basashi from the very horse one is riding, while galloping into the surf off Mizushima Beach. <knuckles with steve>

So what you're saying is you have a taste for horse sushi?