3 ms·
Yeah, there seem to be a number of special cases. The rules for the trailing `=` case are particularly complicated: {x=} -> "x="+repr(x) {x=:.2f} -> "
by pansa2 6y ago
Yeah, there seem to be a number of special cases.
The rules for the trailing `=` case are particularly complicated:
{x=} -> "x="+repr(x)
{x=:.2f} -> "x="+format(x, ".2f")
{x=:} -> "x="+format(x, "")
{x=:!s:20} -> "x="+format(str(x), "20")
{x=:!r:20} -> "x="+format(repr(x), "20")
https://bugs.python.org/msg341732 https://bugs.python.org/msg341732