Convert a pile of obvious "yes/no" functions to return bool.

This commit is contained in:
Tim Peters 2002-04-04 22:55:58 +00:00
parent 2f486b7fa6
commit bc0e910826
34 changed files with 117 additions and 122 deletions

View file

@ -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