Skip to content

Commit 13eed48

Browse files
authored
PEP 671: Since it keeps getting asked about, add a para on deferreds (#2661)
1 parent fa659f0 commit 13eed48

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

pep-0671.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ While this does not completely explain all the subtleties, it is sufficient to
128128
cover the important distinction here (and the fact that they are similar).
129129

130130

131-
Interaction with other open PEPs
131+
Interaction with other proposals
132132
================================
133133

134134
:pep:`661` attempts to solve one of the same problems as this does. It seeks to
@@ -141,6 +141,16 @@ of the common cases would no longer need sentinels if the true default could
141141
be defined by the function. Additionally, dedicated sentinel objects can be
142142
used as dictionary lookup keys, where :pep:`671` does not apply.
143143

144+
A generic system for deferred evaluation has been proposed at times (not to be
145+
confused with :pep:`563` and :pep:`649` which are specific to annotations).
146+
While it may seem, on the surface, that late-bound argument defaults are of a
147+
similar nature, they are in fact unrelated and orthogonal ideas, and both could
148+
be of value to the language. The acceptance or rejection of this proposal would
149+
not affect the viability of a deferred evaluation proposal, and vice versa. (A
150+
key difference between generalized deferred evaluation and argument defaults is
151+
that argument defaults will always and only be evaluated as the function begins
152+
executing, whereas deferred expressions would only be realized upon reference.)
153+
144154

145155
Implementation details
146156
======================

0 commit comments

Comments
 (0)