We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Sometimes I see code like this:
def f(**kwargs): name = kwargs.pop('name') name = kwargs.get('name') name = kwargs['name']
For all 3 cases 'name' should be regular argument in function:
def f(*, name, **kwargs): ...
Related to #425
The text was updated successfully, but these errors were encountered:
What if name is not provided? And we do not want to change the function's signature (we inherit something, use existing API)?
name
Sorry, something went wrong.
What if name is not provided?
Every this case can be altered by signature:
# kwargs.get('name'): def f(*, name=None): ... # kwargs.pop('name') or kwargs['name']: def f(*, name): ...
I will think about it after #425 is implemented
Closing, since we won't implement #425
No branches or pull requests
Sometimes I see code like this:
For all 3 cases 'name' should be regular argument in function:
Related to #425
The text was updated successfully, but these errors were encountered: