New GitHub issue #95781 from serhiy-storchaka:<br>

<hr>

<pre>
`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.
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/95781">View on GitHub</a>
<p>Labels: type-feature, expert-C-API</p>
<p>Assignee: serhiy-storchaka</p>