summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2020-01-06 10:46:04 (GMT)
committerPablo Galindo <Pablogsal@gmail.com>2020-01-06 10:46:03 (GMT)
commit5136e721d7d9eae62ffad17328566b2315e42c00 (patch)
tree594a2be38e2ad49bca99c5a9fa90559e8a248581 /Tools
parentee94bdb0598f9bc47d6a49e58fffc97aa617be96 (diff)
downloadcpython-5136e721d7d9eae62ffad17328566b2315e42c00.zip
cpython-5136e721d7d9eae62ffad17328566b2315e42c00.tar.gz
cpython-5136e721d7d9eae62ffad17328566b2315e42c00.tar.bz2
argument-clinic: Simplify multi-line string handling (GH-17852)
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/clinic/clinic.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 403d8a4..b503932 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -1182,14 +1182,14 @@ class CLanguage(Language):
lines = [self.group_to_variable_name(g) + " = 1;" for g in group_ids]
lines = "\n".join(lines)
- s = """
+ s = """\
case {count}:
if (!PyArg_ParseTuple(args, "{format_units}:{name}", {parse_arguments})) {{
goto exit;
}}
{group_booleans}
break;
-"""[1:]
+"""
s = linear_format(s, group_booleans=lines)
s = s.format_map(d)
add(s)