changeset: 88427:250b481a0d28 user: Larry Hastings date: Sun Jan 12 08:49:30 2014 -0800 files: Misc/NEWS Tools/clinic/clinic.py description: 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. diff -r cc8b21988efb -r 250b481a0d28 Misc/NEWS --- a/Misc/NEWS Sun Jan 12 08:42:35 2014 -0800 +++ b/Misc/NEWS Sun Jan 12 08:49:30 2014 -0800 @@ -72,6 +72,10 @@ 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 encoding declaration on the second line if the first line contains anything except a comment. diff -r cc8b21988efb -r 250b481a0d28 Tools/clinic/clinic.py --- a/Tools/clinic/clinic.py Sun Jan 12 08:42:35 2014 -0800 +++ b/Tools/clinic/clinic.py Sun Jan 12 08:49:30 2014 -0800 @@ -591,6 +591,12 @@ 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

AltStyle によって変換されたページ (->オリジナル) /