Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected output for string method on whitespace characters #2490

Closed
advikkabra opened this issue Feb 6, 2024 · 0 comments · Fixed by #2586
Closed

Unexpected output for string method on whitespace characters #2490

advikkabra opened this issue Feb 6, 2024 · 0 comments · Fixed by #2586

Comments

@advikkabra
Copy link
Collaborator

When I run the following code:

def f():
    b: str = " \t\n\v\f\r"
    print(b.isspace())
    print(b.islower())
    print(b.isupper())


f()

In Python:

True
False
False

In LPython:

False
True
False

Hence there is a bug in both the isspace() and the islower() methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant