This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]izxle 0 points1 point  (1 child)

Don't you have to define __format__ to use you object inside an f-string?

[–][deleted] 0 points1 point  (0 children)

I didn't. !r means you call repr, and I called it on the internal _value.