PEP 308 syntax suggestions -- a matrix-based approach

Damien Morton newsgroups1 at bitfurnace.com
Fri Feb 14 15:29:14 EST 2003


Are you suggesting that the community vote on all 144 combinations?

"Carl Banks" <imbosol-1045251534 at aerojockey.com> wrote in message
news:5Qb3a.14818$wH5.13330 at nwrddc04.gnilink.net...
>
>
> Rather than everyone suggesting their own favorite syntax for PEP 308,
> we could just break down all the suggestions into manageable parts.
>
> Consider the following conditional in it's C syntax:
>
> a ? b : c
>
>
> Possibilities for a ? b are:
>
> 1) a ? b
> 2) a ?? b
> 3) b if a
> 4) if a: b
> 5) when a: b
> 6) a then b
> 7) cond(a,b
> 8) if a:(b
> 9) cond a:(b
>
>
> Possibilities for _ : c are (where _ is whatever you chose for a ? b):
>
> 1) _ : c
> 2) _ else c
> 3) _ else: c
> 4) _ || c
> 5) _ | c
> 6) _ ! c
> 7) _,c)
> 8) c if not _
>
>
> The third dimension of this matrix has two possibilities:
>
> 1) Parentheses not required
> 2) Parentheses required
>
>
> So instead of all these long, silly new syntax suggestions, we can
> just site our favorite combination in the matrix.  At worst, we have
> to add a new possibility to one of the dimensions.
>
>
>
> (Personally, I prefer PEP308[1,1,1])
>
> --
> CARL BANKS
> --
> http://mail.python.org/mailman/listinfo/python-list
>








More information about the Python-list mailing list