You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs says: When the equal sign '=' is provided, the output will have the expression text, the '=' and the evaluated value ... By default, the '=' causes the repr() of the expression to be provided, unless there is a format specified.
So, you get repr output on rhs in the second case. That can be illustrated on simpler example:
>>> s ="xxx"
>>> print(f'{s}')
xxx
>>> print(f'{s=}')
s='xxx'
Bug report
Bug description:
I define a subclass of StrEnum, and use it in a f-string:
The behaviour of printing StrEnum members in f-strings is different. This seems not intuitive. Is this a bug?
CPython versions tested on:
3.12
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered: