mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Partial introduction of bools where appropriate.
This commit is contained in:
parent
b8bff3f4a9
commit
8ca162f417
18 changed files with 96 additions and 94 deletions
|
@ -221,11 +221,11 @@ def isdigit(char):
|
|||
def isname(name):
|
||||
# check that group name is a valid string
|
||||
if not isident(name[0]):
|
||||
return 0
|
||||
return False
|
||||
for char in name:
|
||||
if not isident(char) and not isdigit(char):
|
||||
return 0
|
||||
return 1
|
||||
return False
|
||||
return True
|
||||
|
||||
def _group(escape, groups):
|
||||
# check if the escape string represents a valid group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue