A bug for raw string literals in Py3k?

Yingjie Lan lanyjie at yahoo.com
Sun Oct 31 23:30:22 EDT 2010


> > > All backslashes in raw string literals are
> interpreted literally.
> > > (seehttp://docs.python.org/release/3.0.1/whatsnew/3.0.html):
> >
> > All backslashes in syntactically-correct raw string
> literals are interpreted literally.
> 
> That's a good way of putting it.
> 

Syntactical correctness obviously depends on the syntax specification.
To cancle the special meaning of ALL backlashes in a raw string literal 
makes a lot of sense to me. Currently, the behavior of backslashes
in a raw string literal is rather complicated I think.
In fact, the backlashes can still escape quotes in a raw string,
and one the other hand, it also remains in the string -- I'm 
wondering what kind of use case is there to justify such a behavior?
Surely, my experience is way too limited to make a solid judgement,
I Hope others would shed light on this issue.

Yingjie


      



More information about the Python-list mailing list