-
Notifications
You must be signed in to change notification settings - Fork 306
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
Python: Add repr() methods #164
base: master
Are you sure you want to change the base?
Conversation
Based on my current understanding of
|
With some limited exceptions (mostly in stdlib), Currently As you said in a comment on #160, Similarly I think the representations for LatLng classes just need to be as clear and simple as possible. |
https://docs.python.org/3/reference/datamodel.html#object.__repr__
Seems like a pretty official recommendation.
I hadn't read up on |
Sure, but it's impossible to implement in many classes, yet every class really needs a Following the recommendation logic, would a
Anyway, at the end of the day it's your library 😄 . If you want it I can easily swap |
This is how Based on what I currently know, I would say make Is there a moderately well respected Python style guide that discusses repr/str? I only found random stackoverflow posts. |
Not that I can find or know of. Django is a large, mature and well documented framework, this is a summary of their
ok. |
Add's
repr()
methods to some core cell/geodetic Python classes.Goal is to make debugging & interactive exploration easier.
(based on #160, only the last commit actually has any changes. Rebase once that's merged)