-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
# Add a code block here, if required
s = ''
s.islower()
Output: False
s.isascii()
Output: True
Output of these two mthods such as islower() and isascii() are inconsistent.
s.isascii()
Output: True
Explanation for this output is "an empty string passes the isascii() check because it does not contain any non-ASCII characters". This same logic should be applied to islower() method as well or the vice versa.
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error