* Terry Reedy <tjreedy at udel.edu> [2007-11-16 18:31:12 -0500]: > > "Gustavo Carneiro" <gjcarneiro at gmail.com> wrote in message > news:a467ca4f0711160617p11564c05q8b2c59e87981c028 at mail.gmail.com... > |I am finding myself often doing for loops over a subset of a list, like: > | > | for r in results: > | if r.numNodes != numNodes: > | continue > | # do something with r > > Why write it backwards? > > for r in results: > if r.numNodes == numNodes > # do something with r > > is the direct parallel with the below code. The extra level of indentation is awkward. -- mithrandi, i Ainil en-Balandor, a faer Ambar -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature Url : http://mail.python.org/pipermail/python-dev/attachments/20071117/0cb16eef/attachment.pgp
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