Message32897
I'm pretty sure i know how to do this (just
replace the list-making clause of the "atom:"
production with:
'[' [test [list_iter | ',' testlist]] ']'
then update com_list_constructor and the LSQB
clause of com_atom appropriately), but i still
much prefer a style that uses a separator --
if not between clauses, then at least between
the expression and the conditions.
My favourite: [x*2, for x in spam, if x > 3]
The separator after the expression can be comma,
semicolon, or omitted; the separator between
conditions can be any of these as well as colon.
(Greg's original patch chooses "nothing-nothing";
i choose "comma-comma".)
The results of Greg Wilson's survey may also be
useful. Once a decision is made, it should be
easy to adjust the grammar for any of these
twelve possibilities.
So all we need is a Pronouncement. :) |
|
Date |
User |
Action |
Args |
2007-08-23 14:59:42 | admin | link | issue400654 messages |
2007-08-23 14:59:42 | admin | create | |
|