
On 12/10/2011 8:22 PM, Nick Coghlan wrote:
PEP 403 is a far simpler idea, that looks to decorators (and Ruby blocks) for inspiration. It's still a far from perfect idea, but it has a lot more going for it than PEP 3150 ever did.
-1 for syntactic ridiculousness... I personally find it (whether postdef or : or whatever) unreadable and probably unfathomable to beginners ("So, WHY do I have to give this function a name if it's just going to be ignored?" "Because nobody could think of a good syntax."). IMHO anonymous blocks (Amnesiac blocks? They had a name but they forgot it) are not worth complicating the language definition (that is, the mental model, not necessarily the implementation) to this degree.
The new PEP is included below and is also available online: http://www.python.org/dev/peps/pep-0403/
The text in your email is different from the text on python.org. In particular, the first sentence in the version on python.org is unfinished: This PEP proposes the addition of postdef as a new function prefix syntax (analogous to decorators) that permits the execution of a single simple statement (potentially including substatements separated by semi-colons) after Matt