-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
use keyword only args where appropriate #27544
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
Comments
Good idea - is this supported in Py3.5? |
yes |
I like this. I can try for |
isn't this a breaking api change? |
yes, but IMHO a minor one, you almost always use keyword args with the functions with many args anyhow |
so if we go for straight break, we should do this for 1.0? |
yes this would be for 1.0 |
For posterity, in #27573 we're using a decorator to deprecate passing keyword arguments positionally. This not be API breaking. |
we've done a lot of this and have gotten into the habit. closing as complete. |
we should use keyword only arguments for some of our functions that have large numbers of kwargs to make it harder to make mistakes in the calling conventions, a prime example is [read_csv](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html?highlight=read_csv#pandas.read_csv].
likely we want a signature
def read_csv(self, filepath_or_buffer, *, .......
IOW all args, except for the first should be kwargs.
We could further modify a fair number of functions, so will treat this as a tracking issue.
The text was updated successfully, but these errors were encountered: