"Heiko Wundram" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>    As I've noticed that I find myself typing the latter quite often
>    in code I write, it would only be sensible to add the corresponding
>    syntax for the for statement:
>
>      for node in tree if node.haschildren():
>          <do something with node>
>
>    as syntactic sugar for:
>
>      for node in tree:
>          if not node.haschildren():
>              continue
>          <do something with node>

Isn't this the same as

      for node in tree:
          if  node.haschildren():
              <do something with node>

so that all you would save is ':\n' and the extra indents?

tjr




_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to