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

Style of __repr__ in Individual #230

Closed
wants to merge 1 commit into from
Closed

Style of __repr__ in Individual #230

wants to merge 1 commit into from

Conversation

galenseilis
Copy link
Contributor

Personally, I find it more readable when the __repr__ for classes like this have brackets around the information being displayed as object attributes and tells us what type of information that it is.

I.e.

The output

Individual 1

is simpler than

Individual(id_number=1)

but explicitly shows us what attribute is being communicated.

Personally, I find it more readable when the `__repr__` for classes like this have brackets around the information being displayed as object attributes and tells us what type of information that it is.

I.e.

The output

`Individual 1`

is simpler than

`Individual(id_number=1)`

but explicitly shows us what attribute is being communicated.
@galenseilis
Copy link
Contributor Author

TODO: Update tests of __repr__.

@galenseilis galenseilis closed this May 8, 2024
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.

1 participant