mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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
|
@ -56,10 +56,10 @@ def getnum(s):
|
|||
# Function to check if a string is a number
|
||||
#
|
||||
def isnum(s):
|
||||
if not s: return 0
|
||||
if not s: return False
|
||||
for c in s:
|
||||
if not c in digits: return 0
|
||||
return 1
|
||||
if not c in digits: return False
|
||||
return True
|
||||
|
||||
|
||||
# Allowed function return types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue