Skip to content

add mesh __str__ and __repr__ support#4033

Merged
trexfeathers merged 1 commit intoSciTools:mesh-data-modelfrom
bjlittle:mesh-str-repr-support
Feb 25, 2021
Merged

add mesh __str__ and __repr__ support#4033
trexfeathers merged 1 commit intoSciTools:mesh-data-modelfrom
bjlittle:mesh-str-repr-support

Conversation

@bjlittle
Copy link
Member

🚀 Pull Request

Description

This PR adds __str__ and __repr__ support for the Mesh et al.

Note that, for the managers and Connectivity I've opted to make the __repr__ unambiguous, whereas the __str__ is a slicker summary of content.

For the Mesh, which is metadata and data rich, I've not made this distinction i.e., only implemented Mesh.__repr__, hence str(mesh) will return the same result as repr(mesh).


Consult Iris pull request check list

@bjlittle bjlittle force-pushed the mesh-str-repr-support branch from e07ddae to 7a747b4 Compare February 24, 2021 23:15
Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely thought out @bjlittle ; I agree with your decisions, and everything behaves as expected under testing 💐

@trexfeathers trexfeathers merged commit 208e020 into SciTools:mesh-data-model Feb 25, 2021
@bjlittle bjlittle deleted the mesh-str-repr-support branch February 25, 2021 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants