mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Convert a pile of obvious "yes/no" functions to return bool.
This commit is contained in:
parent
2f486b7fa6
commit
bc0e910826
34 changed files with 117 additions and 122 deletions
|
@ -103,9 +103,9 @@ def long_has_args(opt, longopts):
|
|||
raise GetoptError('option --%s not recognized' % opt, opt)
|
||||
# Is there an exact match?
|
||||
if opt in possibilities:
|
||||
return 0, opt
|
||||
return False, opt
|
||||
elif opt + '=' in possibilities:
|
||||
return 1, opt
|
||||
return True, opt
|
||||
# No exact match, so better be unique.
|
||||
if len(possibilities) > 1:
|
||||
# XXX since possibilities contains all valid continuations, might be
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue