This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ezio.melotti, mrabarnett, serhiy.storchaka, Сергей Снегирёв
Date 2016-12-19.16:02:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1482163321.69.0.0905111341732.issue29015@psf.upfronthosting.co.za>
In-reply-to
Content
There is a problem with your replacement template. Python string literal '\\' is Python string containing a single backslash character. But backslash has special meaning in a replacement template, it starts escapes and backreferences. For using a literal backslash, it should be escaped: r'\\' or '\\\\'.

>>> re.sub(pat, r'\\', path)
'd:\\temp\\'
History
Date User Action Args
2016-12-19 16:02:01serhiy.storchakasetrecipients: + serhiy.storchaka, ezio.melotti, mrabarnett, Сергей Снегирёв
2016-12-19 16:02:01serhiy.storchakasetmessageid: <1482163321.69.0.0905111341732.issue29015@psf.upfronthosting.co.za>
2016-12-19 16:02:01serhiy.storchakalinkissue29015 messages
2016-12-19 16:02:01serhiy.storchakacreate