[Python-ideas] Statements vs Expressions... why?

Adam Olsen rhamph at gmail.com
Thu Sep 11 23:40:35 CEST 2008


On Thu, Sep 11, 2008 at 3:06 PM, Cliff Wells <cliff at develix.com> wrote:
> On Thu, 2008-09-11 at 16:21 -0400, Mike Meyer wrote:
>> Also, you've claimed a number of times
>> that you didn't want to change the syntax of python, but this clearly
>> requires a syntax change, as current python syntax doesn't allow
>> multiple colon-separated statements on a line.
>
> No, I stated I didn't want to *add* any additional syntax (i.e. block
> delimiters, keywords or whatnot), nor do I want to break existing code.
> I certainly propose changing the grammar (albeit in a demonstrably
> backwards-compatible way).

We keep disagreeing on this point.  You're not adding any new tokens,
but you are adding a ton of new syntax!

Not to mention that doing it generically doesn't work (a for-loop
needs to evaluate eagerly, but mustn't retain all the values it
contained), and your primary example (dispatch-dict) only needs lambda
to allow statements, rather than the broad changes you suggest.


-- 
Adam Olsen, aka Rhamphoryncus



More information about the Python-ideas mailing list