On Fri, Aug 11, 2017 at 12:28 AM, Steve D'Aprano <steve+pyt...@pearwood.info> wrote: > How about these? > > [x + y for x in (0, 1, 2, 999, 3, 4) while x < 5 for y in (100, 200)] > > [x + y for x in (0, 1, 2, 999, 3, 4) if x < 5 for y in (100, 200)] >
I know exactly what the current syntax does, and yet I fell into an automatic mental trap of expecting (100, 200) to be a range. So "intuitiveness" is not necessarily reliable. ChrisA -- https://mail.python.org/mailman/listinfo/python-list