summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2014-01-12 16:49:30 (GMT)
committerLarry Hastings <larry@hastings.org>2014-01-12 16:49:30 (GMT)
commit583baa8fef6b69d32b8c41b777c879e387ea46e3 (patch)
treec8dc85c555b6aa5a1aaa2c8f251387d59c05b975 /Tools
parenta70805e1fa592076cc1188a62fbf35b6b863c430 (diff)
downloadcpython-583baa8fef6b69d32b8c41b777c879e387ea46e3.zip
cpython-583baa8fef6b69d32b8c41b777c879e387ea46e3.tar.gz
cpython-583baa8fef6b69d32b8c41b777c879e387ea46e3.tar.bz2
Issue #20196: Fixed a bug where Argument Clinic did not generate correct
parsing code for functions with positional-only parameters where all arguments are optional.
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/clinic/clinic.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 421b9e3..cd7c597 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -591,6 +591,12 @@ static {impl_return_type}
count_min = min(count_min, count)
count_max = max(count_max, count)
+ if count == 0:
+ add(""" case 0:
+ break;
+""")
+ continue
+
group_ids = {p.group for p in subset} # eliminate duplicates
d = {}
d['count'] = count