[issue39842] partial_format()

Serhiy Storchaka report at bugs.python.org
Wed Mar 4 14:10:16 EST 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

What would "{} {}".partial_format({}) return?

It is not possible to implement a "safe" variant of str.format(), because in difference to Template it can call arbitrary code and allows easily to produce arbitrary large strings. Template is more appropriate if the template came from untrusted source or if it is composed by inexperienced user.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39842>
_______________________________________


More information about the Python-bugs-list mailing list