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

Fix *args as positional arguments #597

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mwtoews
Copy link
Contributor

@mwtoews mwtoews commented Dec 19, 2024

This PR fixes the wording to describe *args as positional arguments, and adds a full stop at the end.

Comment on lines -231 to 234
Additional arguments should be passed as keyword arguments
Additional arguments should be passed as positional arguments.
**kwargs
Extra arguments to `metric`: refer to each metric documentation for a
list of all possible arguments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for highlighting this confusing phrasing, @mwtoews.

Since this example is entirely made up, I was wondering if we can't come up with something more intuitive. E.g.:

def red_print(*args, **kwargs):
   """Print text in red.

   Parameters
   ----------
   *args
       Positional arguments, passed to `print`.
   **kwargs
       Keyword arguments, passed to `print`.
   ...

This is not the best example, but it's late :) Something more computational would be good.

I think this was the original goal with the metric usage in **kwargs, but it doesn't really come across.

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.

2 participants