
On Sat, 18 Jun 2022 at 03:45, Chris Angelico <rosuav@gmail.com> wrote:
This raises another choice: should lazy defaults be evaluated before entering the body of the function, or at the point where the parameter is used? Which would be more useful?
# `defer n=len(items)` def func(items=[], n=>len(items)): items.append("Hello") print(n)
func()
That's one of the problems. Generic lazy evaluation should be processed at some point where the parameter is used, but late-bound defaults are evaluated as the function begins. They are orthogonal.
That sounds like an *extremely* good statement to make in the "Rejected suggestions" section of the PEP, explaining why the PEP's proposal and a "lazy evaluation" proposal are different.
At what point is an unrelated proposal a "rejected idea"? How different does it have to be before it doesn't help to have it in that section?
At the point where people repeatedly offer it as an alternative to the PEP. If it's so unrelated as to make no sense at all, just add it as "XXX: rejected as it solves a different problem" or similar. But your response above is better for the lazy evaluation suggestion, and explains why you think it's unrelated.
You're welcome to keep on arguing for the sake of arguing, but you're not actually accomplishing anything by it. Especially since you're rehashing the exact same complaints that you raised previously, and which I responded, exactly the same way, at the time.
*Everyone* is just rehashing the same comments by this point. People are piling in because of a fear that if they don't, someone will claim that we now have consensus, not because they have anything new to add. IIRC, someone early in this thread even said something along the lines of "we seem to be reaching a consensus", but I can't find the reference now. I'd suggest that Chris either mark the PEP as withdrawn, to make it explicit that he has no plans to submit it, or submit it to the SC (ideally with a note for transparency saying that there was no consensus on python-ideas). Nobody is really benefiting from repeating this discussion over and over. Paul