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

Not accurate when outputting an error during byte formatting for the 'i' flag, the 'd' flag is output, which can be misleading #130928

Closed
Assignees
ApostolFet
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error
@ApostolFet

Description

@ApostolFet

Bug report

Bug description:

Code for demonstration:

>>>b"%i"%"str"Traceback (mostrecentcalllast):File"<python-input-0>",line1,in<module>b"%i"%"str"~~~~~~^~~~~~~TypeError:%dformat:arealnumberisrequired,notstr

Expected error message text:

TypeError:%iformat:arealnumberisrequired,notstr

Also for strings this message is output correctly:

>>>"%i"%"str"Traceback (mostrecentcalllast):File"<python-input-1>",line1,in<module>"%i"%"str"~~~~~^~~~~~~TypeError:%iformat:arealnumberisrequired,notstr

I would like to send a PR to fix this.

CPython versions tested on:

3.12, 3.13, 3.14, CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp