Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the __repr__() logic into .info() #29

Merged
merged 1 commit into from
Jul 28, 2023
Merged

Move the __repr__() logic into .info() #29

merged 1 commit into from
Jul 28, 2023

Conversation

JamesWrigley
Copy link
Member

This hasn't happened yet, but one could imagine doing something like putting one of these objects into a list or something and repr() completely breaking the pretty-printing. Instead we now recommend using .info() like with DataCollection's.

@takluyver
Copy link
Member

LGTM. I generally try to follow this pattern of having a single line repr and explicit methods to get more detailed info, although I know not everyone agrees.

Another option if people don't like that might be to use the IPython special methods to provide a Markdown/HTML repr, which is not used in a container (unless that's changed recently).

This hasn't happened yet, but one could imagine doing something like putting one
of these objects into a list or something and __repr__() completely breaking the
pretty-printing. Instead we now recommend using .info() like with
DataCollection's.
@JamesWrigley JamesWrigley merged commit b23b0f3 into master Jul 28, 2023
4 checks passed
@JamesWrigley JamesWrigley deleted the scantool branch July 28, 2023 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants