You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's time to stop creating methods and classes like this:
def __init__(self, **keywords):
if 'hello' in keywords:
hello = keywords['hello']
else:
hello = 'hi'
All the keywords expected by a method should be in the function signature:
def __init__(self, *, hello='hi'):
It's still okay to allow a generic **keywords argument, if the class is expected to be subclassed by something with more keywords or if it calls a subfunction that might have more keywords:
It's time to stop creating methods and classes like this:
All the keywords expected by a method should be in the function signature:
It's still okay to allow a generic
**keywords
argument, if the class is expected to be subclassed by something with more keywords or if it calls a subfunction that might have more keywords:But it's not at all apparent to a user what is possible with
**keywords
in the current state.Do this before (or start it) as part of #763 show implementation.
The text was updated successfully, but these errors were encountered: