Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

time.strftime(arg) fails when arg is not valid format string #4157

Open
Labels
good first issueGood for newcomersz-ca-2022Tag to track contrubution-academy 2022
@jopemachine

Description

@jopemachine

Expected Result

In cpython, when arg is not a valid format string,strftime returns arg itself.

>>> import time>>> time.strftime("%Y")'2022'>>> time.strftime("%4Y")'4Y'

Actual Result

In RustPython,strftime raise panic when arg is not a valid format string

>>>>> import time>>>>> time.strftime("%Y")'2022'>>>>> time.strftime("%4Y")thread 'main' panicked at 'a Display implementation returned an error unexpectedly: Error', /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/string.rs:2490:14note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersz-ca-2022Tag to track contrubution-academy 2022

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp