
On 2022-06-17 14:23, Chris Angelico wrote:
I've just pushed a change to the wording. Let's see if it makes a difference.
I think the PEP would benefit from a fully explicit definition of exactly when and how the late-bound defaults would be evaluated. For instance, by demonstrating an "unrolling" into something paralleling existing Python code. Like:
def f(a=>items[0], items=[]): # body
is equivalent to:
def f(a=FakeDefault, items=[]): a = items[0] # body
That IS in the PEP. Have you read it?
This is all academic to me, however, since even if you did
I read it before your update. Is the version up now the updated one? I'm guessing it is, because of the remark about "implementations may choose to do this in two separate passes". But I don't see where something like what I showed there is given as a specification. I do see the "How to Teach This" section, which has an example similar to mine. But that pretty clearly isn't specifying the behavior. It still talks about "broadly equivalent" and a "rule of thumb", which are more ways of saying things other than a fully explicit and normative specification of the behavior. that I still
wouldn't support the PEP for various more basic reasons that I've mentioned in the earlier iteration of this thread.
And there we have it. People are complaining loudly, but then ALSO saying that they don't support the proposal anyway. Why are you bothering to debate this if you've already made your decision?
I didn't intend to initially, but as the discussion continued I figured since everyone else was restating their opinions there's no reason I can't do so as well. :-) Also, to avoid people coming back later and saying that some kind of consensus emerged in the second round because no one objected, etc. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown