
April 21, 2021
8:05 a.m.
20.04.21 22:01, Guido van Rossum пише:
So to be clear, that one user wants f"{Color.RED}" to return "1" and not " Color.RED" (or something like that).
The user should write f"{int(Color.RED)}" or f"{Color.RED.value}". I have also an idea to support of additional conversion characters, so the use could write f"{Color.RED!i}". Opened a discussion for this on Python-ideas. https://mail.python.org/archives/list/python-ideas@python.org/thread/3AALXB6...