Github user mengxr commented on the pull request:
https://github.com/apache/spark/pull/3307#issuecomment-63396749
@davies I really want to force user to use named arguments because it is
really hard to determine what is the right ordering of those parameters. I saw
a slightly hacky solution here for Python 2
(http://stackoverflow.com/questions/2965271/forced-naming-of-parameters-in-python):
~~~python
__named_only_start = object()
def info(param1,param2,param3,_p=__named_only_start,spacing=10,collapse=1):
if _p is not __named_only_start:
raise TypeError("info() takes at most 3 positional arguments")
~~~
If you feel this is too hacky, this is the ordering I would recommend:
`data, numIterations, initialWeights, regParm, regType, intercept, corrections,
tolerance`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]