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

More strict format checks in PyUnicode_FromFormat() #95781

Closed
Assignees
serhiy-storchaka
Labels
@serhiy-storchaka

Description

@serhiy-storchaka

PyUnicode_FromFormat() is loose in checking for errors in the format string. If it encounter an invalid format specifier, it silently outputs the rest of the format string. And it allows digits between%s:"%123%" is interpreted the same as"%%", i.e. as literal%.

It was not a big problem, because it is expected that the user of the C API do not make mistakes in the format string, and incorrect format string can easily lead to crash. But id did not help either.

Recently it was discussed on Discuss:https://discuss.python.org/t/pyunicode-fromformat-allow-format-with-precision/17873.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp