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

Custom description when printing instances of classes from coolest.template #49

Open
aymgal opened this issue Jul 31, 2023 · 0 comments

Comments

@aymgal
Copy link
Owner

aymgal commented Jul 31, 2023

Currently, calling print() on a given object from the coolest template interface returns the default description, e.g. <coolest.template.classes.galaxy.Galaxy object at 0x1304daa60>.

It would be much better if the description gives useful information about the object itself, such as the mass/light profiles for a Galaxy object, or stored values for a Parameter object for instance. A simple solution is to write a custom __desc__() method for each class.

@aymgal aymgal changed the title Custom __desc__ methods for all coolest.template classes Custom description when printing instances of classes from coolest.template Jul 31, 2023
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

No branches or pull requests

1 participant