From 9d7849f454dbda30b55de3922093b567ad662714 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Sat, 25 Jan 2014 03:26:20 -0600 Subject: Issue #20376: Argument Clinic now escapes backslashes in docstrings. --- Misc/NEWS | 2 ++ Tools/clinic/clinic.py | 1 + 2 files changed, 3 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index a8e251a..c3e8e88 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -142,6 +142,8 @@ Tests Tools/Demos ----------- +- Issue #20376: Argument Clinic now escapes backslashes in docstrings. + - Issue #20381: Argument Clinic now sanity checks the default argument when c_default is also specified, providing a nice failure message for disallowed values. diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index d33abae..7f1b059 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -120,6 +120,7 @@ def fail(*args, filename=None, line_number=None): def quoted_for_c_string(s): for old, new in ( + ('\\', '\\\\'), # must be first! ('"', '\\"'), ("'", "\\'"), ): -- cgit v0.12