Re: [scikit-learn] make all new parameters keyword-only?

2018-11-14 Thread Joel Nothman
We could just announce that we will be making this a syntactic constraint
from version X and make the change wholesale then. It would be less formal
backwards compatibility than we usually hold by, but we already are loose
with parameter ordering when adding new ones.

It would be great if after this change we could then reorder parameters to
make some sense!
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


Re: [scikit-learn] make all new parameters keyword-only?

2018-11-14 Thread Andreas Mueller



On 11/14/18 8:36 PM, Hanmin Qin wrote:
I agree that this feature is advantageous and I'm +1 to apply it to 
new classes/functions, but for existing classes/functions, does it 
seem strange that only certain arguments are keyword only (i.e., some 
arguments can be specified by position, while others can't)?


yes, but it would discourage users from specifying any by position, 
which I think they really shouldn't.


No-one understands what RandomForestClassifier(100, gini, 5, 6, 7, .3, 
.4, 3, .1, .2, True)  means.


And if we deprecate a parameter it might still run but mean something else.

___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


Re: [scikit-learn] make all new parameters keyword-only?

2018-11-14 Thread Hanmin Qin
I agree that this feature is advantageous and I'm +1 to apply it to new 
classes/functions, but for existing classes/functions, does it seem strange 
that only certain arguments are keyword only (i.e., some arguments can be 
specified by position, while others can't)?
Hanmin Qin
- Original Message -
From: Andreas Mueller 
To: scikit-learn@python.org
Subject: [scikit-learn] make all new parameters keyword-only?
Date: 2018-11-15 05:01


Hi all.
Since we'll be dropping Python2.7 soon, we can now use keyword-only 
arguments.
I would argue that whenever we add any argument anywhere, we should make 
it keyword-only from now on,
with the exception of X and y (probably).
What do others think?
Are there other features in Python3 that we should consider adopting for 
0.21?
The reason for making arguments keyword-only is that
a) users are force to write more readable code
b) deprecations and api changes have less side-effects
Cheers,
Andy
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


[scikit-learn] make all new parameters keyword-only?

2018-11-14 Thread Andreas Mueller

Hi all.
Since we'll be dropping Python2.7 soon, we can now use keyword-only 
arguments.
I would argue that whenever we add any argument anywhere, we should make 
it keyword-only from now on,

with the exception of X and y (probably).
What do others think?
Are there other features in Python3 that we should consider adopting for 
0.21?


The reason for making arguments keyword-only is that
a) users are force to write more readable code
b) deprecations and api changes have less side-effects

Cheers,
Andy
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn