[Python-ideas] An Alternate Suite Delineation Syntax For Python? (was Re: [Python-Dev] [PATCH] Adding braces to __future__)

Paul Moore p.f.moore at gmail.com
Sat Dec 10 12:32:46 CET 2011

On 10 December 2011 05:06, Nick Coghlan <ncoghlan at gmail.com> wrote:
> A more appropriate way to phrase this suggestion would be one that
> clearly states the problems with the status quo and explores them,
> rather than assuming an answer, and indulging in a long rambling
> diatribe against those that will shout you down for adding nothing new
> to the discussion.
> Step 1: post to the right mailing list (i.e. python-ideas, not python-dev)
> Step 2: don't assume the conclusion in the subject line. Ask a
> question, don't state an imperative. For example: "An Alternate Suite
> Delineation Syntax For Python?"
> Step 3: respect the time of others, by trimming your message to its core essence
> For example:

This, along with the original posting on python-dev, is a spectacular
example of how to propose a new feature, and how not to. It would make
an excellent example for a HOWTO document on proposing changes (with
the OP's permission - he might not like his posting being held op as
the canonical "how not to do this" example...) I barely read the
original posting, even though I tried to follow it - my mind was
screaming "ain't never going to happen" at me throughout. And yet
Nick's rewording is pretty persuasive, I can see the benefits and the
power of the idea. My only major objection is that the resulting code
is pretty ugly. I could easily imagine something along these lines
being accepted into Python.

Thanks, Nick, for doing this - and Cedric for the original idea, even
though I didn't appreciate it at the time :-) It certainly got me

As regards the actual proposal, some comments:
- It's got serious power (if, try and with expressions, etc etc)
- It would answer a number of requests that keep coming up over and over again.
- I suspect the semantics in corner cases will be hard to pin down,
but the basic principle looks simple enough
- The code is pretty ugly, and certainly an attractive nuisance for
obfuscated code, but I can't think of a better syntax
- Given that it effectively replaces lambdas and if expressions, it
partly violates OOWTDI - and it does so in a way that could encourage
people to still propose try or with expressions ("they are as common
as conditionals, so why not?")


More information about the Python-ideas mailing list