◐ Shell
clean mode source ↗

gh-129667: Update annotation in documentation by donbarbos · Pull Request #129669 · python/cpython

I'm a bit conflicted with the fact that we're now showing the internal parameters in the signatures. Yes, it could be helpful indeed, but it also exposes implementation details. For functions, I think we could implicitly not include them because an external caller is not meant to use them (probably), however for methods, if the class can be inherited, then children classes may want to know the complete signature just to be sure that they do not violate the Liskov substitution principle.

However, as I said on some functions/methods, I prefer that we don't add new parameters in this PR but only add the positional-only markers. In separate PRs, each added parameter should either explicitly be marked as internal (in the docs) or we should not show it if callers or subclasses do not need to know about it.