Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Original gist: https://gist.github.com/devdanzin/577421b083bad6802aa391b909d1a725
formatfloat (line 163): Returns 0 (success) when _PyUnicode_FromASCII fails. Caller has safety net, but violates return-value contract.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
gh-151845: Fix formatfloat() return-value contract in unicode_format.c (
[3.15] gh-151845: Fix formatfloat() return-value contract in unicode_…
pythongh-151845: Fix formatfloat() return-value contract in unicode_f…