8000 DOC kwonly section in whatsnew (#17059) · thomasjpfan/scikit-learn@a1261a7 · GitHub
[go: up one dir, main page]

Skip to content

Commit a1261a7

Browse files
authored
DOC kwonly section in whatsnew (scikit-learn#17059)
1 parent 91e9427 commit a1261a7

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

doc/whats_new/v0.23.rst

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ Version 0.23.0
1414

1515
Put the changes in their relevant module.
1616

17+
Enforcing keyword-only arguments
18+
--------------------------------
19+
20+
In an effort to promote clear and non-ambiguous use of the library, most
21+
constructor and function parameters are now expected to be passed as keyword
22+
arguments (i.e. using the `param=value` syntax) instead of positional. To
23+
ease the transition, a `FutureWarning` is raised if a keyword-only parameter
24+
is used as positional. In version 0.25, these parameters will be strictly
25+
keyword-only, and a `TypeError` will be raised.
26+
:issue:`15005` by `Joel Nothman`_, `Adrin Jalali`_, `Thomas Fan`_, and
27+
`Nicolas Hug`_. See `SLEP009
28+
<https://scikit-learn-enhancement-proposals.readthedocs.io/en/latest/slep009/proposal.html>`_
29+
for more details.
30+
1731
Changed models
1832
--------------
1933

@@ -536,12 +550,6 @@ Miscellaneous
536550
error message is raised when y was expected but None was passed.
537551
:pr:`16622` by `Nicolas Hug`_.
538552

539-
- |API| Most constructor and function parameters are now expected to be passed
540-
as a keyword and not positional. :issue:`15005` by `Joel Nothman`_,
541-
`Adrin Jalali`_, `Thomas Fan`_, and `Nicolas Hug`_. See `SLEP009
542-
<https://scikit-learn-enhancement-proposals.readthedocs.io/en/latest/slep009/proposal.html>`_
543-
for more details.
544-
545553
Code and Documentation Contributors
546554
-----------------------------------
547555

0 commit comments

Comments
 (0)
0