is this a Python bug?

Brian Langenberger brian at brian.cbs.umn.edu
Tue Feb 15 14:54:50 EST 2000


R is supposed to work to give raw strings with the backslashes stored
as backslashes.  I've never had a problem until I tried making a
string with nothing but backslashes.  When I did, I got this result:


Python 1.5.2 (#1, Sep 17 1999, 20:15:36)  [GCC egcs-2.91.66 19990314/Linux (egcs- on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> r'\\\'
  File "<stdin>", line 1
    r'\\\'
         ^
SyntaxError: invalid token
>>> 


Is this an error in the implementation or did I miss something in
the docs?  I don't actually *need* such a string; I just found this
while experimenting with the interpreter.





More information about the Python-list mailing list