-
Notifications
You must be signed in to change notification settings - Fork 43
Add Python reprs (implemented in rust) #1217
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
base: main
Are you sure you want to change the base?
Conversation
icechunk/src/display.rs
Outdated
| @@ -0,0 +1,26 @@ | |||
| pub fn dataclass_repr(class_name: &str, attributes: &[(&str, &str)]) -> String { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used a slice here because it seemed to be a simple way to pass an ordered list of str-str pairs. I first tried a HashMap but that doesn't preserve order which led to my reprs looking different every time!
Apparently there is an IndexMap thing that preserves insertion order, which sounds neat, but I didn't use that because it would have added a dependency.
Would close #1208, supercedes #1209.
To-do: