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

Force use of keyword arguments in method calls #19

Open
ahggns opened this issue Sep 18, 2018 · 1 comment
Open

Force use of keyword arguments in method calls #19

ahggns opened this issue Sep 18, 2018 · 1 comment

Comments

@ahggns
Copy link

ahggns commented Sep 18, 2018

Method signatures are unstable due to a side effect of the implementation of #14. In order to prevent difficult to debug breaks we should force keyword arguments to be used.

This can be supported out of the box in Python 3:

def fun(*, arg1, arg2):
  pass

But we'll have to get creative for backcompat with Python 2:

def fun(*args, arg1, arg2):
   if args:
     raise ValueError("...")

@ferozco
cc @JacekLach, @jamding

@ferozco
Copy link
Contributor

ferozco commented Sep 18, 2018

+1

I was actually in the process of writing up an RFC for something like this across languages

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

No branches or pull requests

2 participants