On Wed, Sep 26, 2018 at 1:29 PM Mikhail V <mikhail...@gmail.com> wrote: > > On Wed, Sep 26, 2018 at 5:38 AM Chris Angelico <ros...@gmail.com> wrote: > > > > > > I like saying while "something": where the string describes the loop's > > real condition. For instance, while "moar data": if reading from a > > socket, or while "not KeyboardInterrupt": if the loop is meant to be > > halted by SIGINT. > > > > ChrisA > > if doing so, would not it be more practical > to write is as an in-line comment then? > with new syntax it could be like this: > """ > while: # not KeyboardInterrupt > asd asd asd > asd asd asd > asd asd asd > """ > Similar effect, but I would find it better at least because it would > be highlighted as a comment and not as a string, + no quotes noise.
A comment is not better than an inline condition, no. I *want* it to be highlighted as part of the code, not as a comment. Because it isn't a comment - it's a loop condition. 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/