From 7f91cf9a68432ad502ff9a25070b74ca62b9ac8d Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 30 May 2000 13:25:35 +0000 Subject: Add 'r' to docstrings to avoid expanded backslash escapes. (Ka-Ping Yee) --- Lib/nturl2path.py | 6 ++++-- Lib/reconvert.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Lib/nturl2path.py b/Lib/nturl2path.py index ae261ba..0445b8a 100644 --- a/Lib/nturl2path.py +++ b/Lib/nturl2path.py @@ -1,7 +1,8 @@ """Convert a NT pathname to a file URL and vice versa.""" def url2pathname(url): - """ Convert a URL to a DOS path... + r"""Convert a URL to a DOS path. + ///C|/foo/bar/spam.foo becomes @@ -32,7 +33,8 @@ def url2pathname(url): return path def pathname2url(p): - """ Convert a DOS path name to a file url... + r"""Convert a DOS path name to a file url. + C:\foo\bar\spam.foo becomes diff --git a/Lib/reconvert.py b/Lib/reconvert.py index 2b044b6..7c2d376 100755 --- a/Lib/reconvert.py +++ b/Lib/reconvert.py @@ -1,6 +1,6 @@ #! /usr/bin/env python1.5 -"""Convert old ("regex") regular expressions to new syntax ("re"). +r"""Convert old ("regex") regular expressions to new syntax ("re"). When imported as a module, there are two functions, with their own strings: -- cgit v0.12