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
This is a question moved from #1112 for discussion. Currently RMG's __repr__ methods only output non-default values for class attributes. Should they include all of them?
The text was updated successfully, but these errors were encountered:
While, I don't think this is a huge deal. As I said before on #1112, my opinion is that we shouldn't assume that the user printing the object out knows what the defaults are, and for most objects I don't think the extra printed out text ~10% more (roughly I think?) in the repr methods is all that annoying. I think it saves someone a few minutes checking what the default attributes are and that they're only printed if they're not default. I don't mean to argue that it's worth our time to change them, but I don't think it hurts us as much as it helps us to print them out.
My inclination would have been towards the other approach: have the __repr__ produce the cleanest and briefest possible output that would reproduce the original object when evaluated. Also in a way reminds people that there are defaults.
But I don't feel too strongly and maybe could be convinced - especially if the 10% estimate isn't far off.
How many instances of this are we talking about anyway?
Possibly there's a middle ground - things that get printed rarely, like a reaction system, include them all. Things that get printed a ton (like entries in a library) keep them brief?
(pedantic check: I think @goldmanm means data attributes on instances, not Class attributes? )
This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.
This is a question moved from #1112 for discussion. Currently RMG's
__repr__
methods only output non-default values for class attributes. Should they include all of them?The text was updated successfully, but these errors were encountered: