Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #84663
| From | Emile van Sebille <emile@fenx.com> |
|---|---|
| Subject | Re: Is there a more elegant way to spell this? |
| Date | 2015-01-27 10:27 -0800 |
| References | <ma8311$q4c$1@ger.gmane.org> <mailman.18171.1422364818.18130.python-list@python.org> <20150127094911.236b6e6d@rg.highlandtechnology.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.18183.1422383271.18130.python-list@python.org> (permalink) |
On 1/27/2015 9:49 AM, Rob Gaddi wrote:
> Or the somewhat less indenty
>
> for x in seq:
> if not some_predicate: continue
> do_something_to(x)
>
... or shorter and equally less indenty
for x in seq:
if some_predicate: do_something_to(x)
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Is there a more elegant way to spell this? Chris Warrick <kwpolska@gmail.com> - 2015-01-27 14:20 +0100
Re: Is there a more elegant way to spell this? Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-01-27 09:49 -0800
Re: Is there a more elegant way to spell this? Emile van Sebille <emile@fenx.com> - 2015-01-27 10:27 -0800
csiph-web