A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-May/065102.html below:

[Python-Dev] PEP-xxx: Unification of for statement and list-comp syntax

[Python-Dev] PEP-xxx: Unification of for statement and list-comp syntax [Python-Dev] PEP-xxx: Unification of for statement and list-comp syntaxGreg Ewing greg.ewing at canterbury.ac.nz
Mon May 22 02:22:03 CEST 2006
Heiko Wundram wrote:

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

Er, you do realise that can be written more straightforwardly as

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

--
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4