From e61f18a10458a2a9f7879c1743d78d82f8d76c98 Mon Sep 17 00:00:00 2001 From: Chris Angelico Date: Sun, 24 Oct 2021 22:48:56 +1100 Subject: [PATCH] PEP 671: Mention PEP 661, which solves some of the same problems --- pep-0671.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pep-0671.rst b/pep-0671.rst index 0dafa7753..a144829d1 100644 --- a/pep-0671.rst +++ b/pep-0671.rst @@ -109,6 +109,20 @@ bound arguments are broadly equivalent to code at the top of the function:: if target was omitted: target = [] +Interaction with other open PEPs +================================ + +PEP 661 attempts to solve one of the same problems as this does. It seeks to +improve the documentation of sentinel values in default arguments, where this +proposal seeks to remove the need for sentinels in many common cases. PEP 661 +is able to improve documentation in arbitrarily complicated functions (it +cites ``traceback.print_exception`` as its primary motivation, which has two +arguments which must both-or-neither be specified); on the other hand, many +of the common cases would no longer need sentinels if the true default could +be defined by the function. Additionally, dedicated sentinel objects can be +used as dictionary lookup keys, where PEP 671 does not apply. + + Open Issues ===========