Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

You need to use the PEP 570 syntax if your function/method have a var-keyword 
parameter, takes arbitrary keyword arguments, and has other parameters beside 
the var-keyword parameter ("self" counts). And of course the minimal supported 
Python version should be 3.8.

In PR 13700 the PEP 570 syntax was added in the documentation of functions that 
use it in the code (like partial() and getcallargs()) and also in the examples 
of user code where it is needed (like LRU, Callback and Namespace).

PR 13743 adds it the documentation of functions which do not accept arbitrary 
keywords, but take some of arguments as positional only and others as 
positional or keyword. It may be surprising, so I think it is better to 
document this explicitly.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37134>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to