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

Hanmin Qin qinhanmin2005 at sina.com
Wed Nov 14 20:36:28 EST 2018


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 <t3kcit at gmail.com>
To: scikit-learn at 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 at python.org
https://mail.python.org/mailman/listinfo/scikit-learn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20181115/ada0d22f/attachment.html>


More information about the scikit-learn mailing list