Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unexpected output for string method on whitespace characters #2490

Closed
@advikkabra

Description

@advikkabra

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions