-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Add print() option #492
Add print() option #492
Conversation
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.
@AaronDMarasco
Interesting. Thanks for making the PR. I rarely use the print function but it seems you are using it extensively that you want to add a prefix.
Do you think the fstring overhead is that much? If yes, please go ahead with your suggestion. Compared to a lot of other parts of the code that we should optimize, I don't think the f-string's overhead is that much.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #492 +/- ##
=======================================
Coverage 96.55% 96.55%
=======================================
Files 14 14
Lines 3946 3950 +4
=======================================
+ Hits 3810 3814 +4
Misses 136 136 ☔ View full report in Codecov by Sentry. |
I'd say just take as-is then. Our use case is that we ship a config file and then let the user write one that overrides. Then we dump the diff of the config data structure to the logs, so when they have issues we can see in the logs what may have been a dangerous change. |
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.
LGTM!
@AaronDMarasco For that purpose, we have Delta Serialize To Flat Rows. |
Thanks; I'll read into that more later this week. |
Hi @AaronDMarasco |
Allows a user-defined string (or callback function) to prefix every output when using the
pretty()
call.