[issue37134] Use PEP570 syntax in the documentation

Serhiy Storchaka report at bugs.python.org
Wed Jun 5 02:44:27 EDT 2019


Serhiy Storchaka <storchaka+cpython at 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 <report at bugs.python.org>
<https://bugs.python.org/issue37134>
_______________________________________


More information about the Python-bugs-list mailing list