[issue36774] f-strings: Add a !d conversion for ease of debugging

Serhiy Storchaka report at bugs.python.org
Fri May 3 06:25:41 EDT 2019


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

This conversion is very special. For all other conversions {value:!c:format_spec} is equivalent to format(conv(value), format_spec), but not this conversion. It is also specific for f-strings, and is not particularly useful in format strings.

Would not be better to use more special syntax for it? For example "!=" or "!!"? Letters can be reserved for future "normal" conversions. It may be we even allowed to register new converters by name.

----------

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


More information about the Python-bugs-list mailing list