Skip to content

Commit 0a665aa

Browse files
committed
add _sre.ascii_iscased and ascii_tolower, which were added in 3.7
1 parent a3e2faf commit 0a665aa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

graalpython/lib-graalpython/_sre.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,3 +535,13 @@ def unicode_iscased(codepoint):
535535
@__builtin__
536536
def unicode_tolower(codepoint):
537537
return ord(chr(codepoint).lower())
538+
539+
540+
@__builtin__
541+
def ascii_iscased(codepoint):
542+
return codepoint < 128 and chr(codepoint).isalpha()
543+
544+
545+
@__builtin__
546+
def ascii_tolower(codepoint):
547+
return ord(chr(codepoint).lower()) if codepoint < 128 else codepoint

0 commit comments

Comments
 (0)