mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue #20376: Argument Clinic now escapes backslashes in docstrings.
This commit is contained in:
parent
3ffd913d66
commit
9d7849f454
2 changed files with 3 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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!
|
||||
('"', '\\"'),
|
||||
("'", "\\'"),
|
||||
):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue