Issue 932930: doctest: suggest the use of rawstrings for backslashes (original) (raw)

Issue932930

Created on 2004-04-10 19:55 by edloper, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
rawstrings.diff edloper,2004-04-10 19:55 Diff against libdoctest.tex and doctest.py
Messages (2)
msg45728 - (view) Author: Edward Loper (edloper) * (Python triager) Date: 2004-04-10 19:55
Previously, the doctest documentation suggested the use of double backslashes for backslashes in docstrings. This patch updates the documentation to suggest the use of raw strings instead (but still notes that double backslashes are an option). Raw strings typically lead to docstrings that are much less error prone and easier to read & maintain than double backslashing. Especially it the backslashes are in some complex string (such as a regular expression). The patch was made against revision 1.33 of doctest.py and revision 1.19 of libdoctest.tex
msg45729 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-05-31 19:02
Logged In: YES user_id=21627 Thanks for the patch. Applied as libdoctest.tex 1.20 doctest.py 1.34 Please include path names in the chunks of the patch. This is best done by invoking "cvs diff" from the toplevel directory. That way, the patch can be applied with "patch -p0", instead of splitting it into multiple files again, and applying each chunk separately.
History
Date User Action Args
2022-04-11 14:56:03 admin set github: 40135
2004-04-10 19:55:29 edloper create