On Thu, Jun 28, 2018, 6:46 PM Nicolas Rolin <nicolas.ro...@tiime.fr> wrote:

> The questions I should have asked In my original post was :
> - Is splitting lists into sublists (by grouping elements) a high level
> enough construction to be worthy of a nice integration in the comprehension
> syntax ?
>

My intuition is no, it's not important enough to alter the syntax, despite
being an important task.

- In which case, is there a way to find a simple syntax that is not too
> confusing ?
>

If you'd like to give it a shot, try to find something which is currently
invalid syntax, but does not break compatibility. The latter criteria means
no new keywords. The syntax should look nice as a single line with
reasonably verbose variable names.

One issue is that Python code is mostly 1-dimensional, characters in a
line, and you're trying to express something which is 2-dimensional, in a
sense. There's only so much you can do without newlines and indentation.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to