On Wed, Oct 5, 2016 at 2:42 AM, David Mertz <me...@gnosis.cx> wrote: > On Oct 4, 2016 6:20 AM, "Random832" <random...@fastmail.com> wrote: >> > for item in items if item is not None: >> > ... >> > else: >> > # ??? > >> >> I think it's obvious that it would be on the outermost construct (i.e. >> the one that would still be at the same indentation level fully >> expanded). > > I think it's obvious it would be the innermost construct... Or at least very > plausible.
My reading of this is that the loop consists of a single filtered iteration, ergo break/continue/else are as if the loop used a generator: # for item in items if item is not None: for item in (item for item in items if item is not None): These two would be semantically equivalent, and the first one has the advantage of not sounding like the Cheshire Cat as Alice entered 'Machinations'. << Time to jump in time to jump through time.... I'm dizzy. >> ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/