PEP 671: Mention PEP 661, which solves some of the same problems
This commit is contained in:
parent
3d9f9b2e98
commit
e61f18a104
14
pep-0671.rst
14
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 = []
|
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
|
Open Issues
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue