Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
ffec8c33
Commit
ffec8c33
authored
Aug 16, 2002
by
Per Cederqvist
Browse files
(isupper): New function. Use it instead of "".isupper.
parent
d7a3f843
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/checkargs.py
View file @
ffec8c33
...
@@ -61,6 +61,12 @@ def isalpha(s):
...
@@ -61,6 +61,12 @@ def isalpha(s):
return
0
return
0
return
1
return
1
def
isupper
(
s
):
for
c
in
s
:
if
c
not
in
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
:
return
0
return
1
def
isdigit
(
s
):
def
isdigit
(
s
):
for
c
in
s
:
for
c
in
s
:
if
c
not
in
"0123456789"
:
if
c
not
in
"0123456789"
:
...
@@ -1110,12 +1116,12 @@ class lexer:
...
@@ -1110,12 +1116,12 @@ class lexer:
ok
=
1
ok
=
1
if
len
(
tp
)
<
0
:
if
len
(
tp
)
<
0
:
ok
=
0
ok
=
0
if
ok
and
not
tp
[
0
].
isupper
():
if
ok
and
not
isupper
(
tp
[
0
]
):
ok
=
0
ok
=
0
upper
=
0
upper
=
0
for
c
in
tp
[
1
:]:
for
c
in
tp
[
1
:]:
if
upper
:
if
upper
:
if
c
==
'-'
or
not
c
.
isupper
():
if
c
==
'-'
or
not
isupper
(
c
):
ok
=
0
ok
=
0
upper
=
0
upper
=
0
else
:
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment