How can I show a repr only for fields that are set? #9444
Unanswered
andrewtruong
asked this question in
Question
Replies: 1 comment
-
By overriding the repr method , you can do that like here
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a class with a lot of options:
If a user wants certain settings, they'll instantiate with just the options they want:
I'd love for it to render exactly like that, but instead it will render more like:
How can I make the repr show only for values that are "set", like this?
Beta Was this translation helpful? Give feedback.
All reactions