Replies: 1 comment
-
Every parameter will be misunderstood at some point by some somebody. Introducing a breaking change because it fits one developer's mental modal a little better, just isn't worthwhile. Best I can do is accept a PR to clarify in the docstring. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I suggest renaming the function parameter
code_format
tohtml_template
or something similar and maybe clarifying the docstring a little."Format string to render HTML." was also not immediately obvious for me, bc the HTML is not rendered, but rather constructed. For me, rendering HTML is what the display element does after inserting the finished HTML.
In general, I think it is not very intuitive when you're not familiar with the library.
The docstring could also replace
{foreground}
with{foreground_color}
, same for{background}
, and{code}
with{content}
or{message}
.To be fair, this is after I spent an embarrassing amount of time figuring out why there is excessive linespacing when I display the messages, only for a nice person on SO to tell me that this function emits an entire HTML page that would cause that issue. Only then did I figure out that you can supply your own template.
I did see the "code_format" parameter earlier, but I dismissed it as I wasn't using any "codes".
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions