Skip to content

Disagreement with CPython for str.zfill #7528

@sunmy2019

Description

@sunmy2019

Python Documentation or reference to CPython source code

tested on current main: 1a9b10e

There are many examples and I picked one.

# the following is True in CPython and False in RustPython
print(
    "á".zfill(5) == "000á",
)

RustPython's implementation did not calculate width correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-compatA discrepancy between RustPython and CPython

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions