mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
a70805e1fa
commit
583baa8fef
|
@ -72,6 +72,10 @@ Tests
|
||||||
Tools/Demos
|
Tools/Demos
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
|
||||||
- Issue #18960: 2to3 and the findnocoding.py script now ignore the source
|
- Issue #18960: 2to3 and the findnocoding.py script now ignore the source
|
||||||
encoding declaration on the second line if the first line contains anything
|
encoding declaration on the second line if the first line contains anything
|
||||||
except a comment.
|
except a comment.
|
||||||
|
|
|
@ -591,6 +591,12 @@ static {impl_return_type}
|
||||||
count_min = min(count_min, count)
|
count_min = min(count_min, count)
|
||||||
count_max = max(count_max, 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
|
group_ids = {p.group for p in subset} # eliminate duplicates
|
||||||
d = {}
|
d = {}
|
||||||
d['count'] = count
|
d['count'] = count
|
||||||
|
|
Loading…
Reference in New Issue