single/double quote escape interpolation

Simon Bunker simon at
Mon Jul 7 21:21:19 CEST 2003

I was just wondering why python doesn't make a distinction between single
and double
quotes - a bit like Perl does.

Obviously I realise there are no dollar signs so you can't intrpolate a
varaible in a string.
This is fine, but having to remember to put an r in front of regex's is
really annoying and it would
be great if you could jsut use single quotes instead to interpolate slashes
properly etc. (ie only escape them once).

I could not find this on google, but I guess it has been discussed before.
Is there a good reason?



More information about the Python-list mailing list