On 5/3/07, Georg Brandl <[EMAIL PROTECTED]> wrote:
> > These are raw strings if you didn't notice.
>
> It's all in the implementation. The tokenizer takes it as an escape sequence
> -- it doesn't specialcase raw strings -- the AST builder (parsestr() in ast.c)
> doesn't.

FWIW, it wasn't designed this way so as to be easy to implement. It
was designed this way because the overwhelming use case is regular
expressions, where one needs to be able to escape single and double
quotes -- the re module unescapes \" and \' when it encounters them.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to