conjure-python icon indicating copy to clipboard operation
conjure-python copied to clipboard

Force use of keyword arguments in method calls

Open ahggns opened this issue 7 years ago • 1 comments

Method signatures are unstable due to a side effect of the implementation of https://github.com/palantir/conjure-python/pull/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

ahggns avatar Sep 18 '18 14:09 ahggns

+1

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

ferozco avatar Sep 18 '18 14:09 ferozco