This discussion started on Python-Ideas (q.v.), and is also somewhat applicable to Python-Dev. I think further discussion belongs on Core-Mentorship, though. Cc'd and reply-to set. bunslow writes:
My first submission to this list was predicated on what I'd read in PEPs -- and many of those, since they recommend major-enough changes to require a PEP, have sections (often lengthy) dedicated to "what's wrong with the status quo".
That's a good point! However, even a for modest enhancement, you do need to advocate from "what's wrong with the status quo". But that is most persuasive when it can be phrased as "you can't do X", or at least "you can't do X without Y", and this change allow that feature. And Y usually should not be something that most Python programmers do in the ordinary course of writing code, such as defining functions or classes. This is quite a fine point though. I note that Nick defended a *very* short context manager (the "null" context manager) on the grounds that typical Python programmers think of context managers as being a bit magical. They use them all the time in the recommended idioms for file handling and the like, but they very rarely write them. Again, "writing loop statements" is usually considered something that doesn't qualify as a "Y", but we got comprehensions and then generators. I'm not sure what the lesson is here. Maybe it's that crossing the statement/expression boundary is a Y. Or maybe it's that comprehensions and generators are imports of features successful in other languages, so were relatively easy to accept. Regards, Steve