Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #55420
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python.list@tim.thechases.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.007 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'skip:[ 20': 0.04; 'params': 0.09; 'thread': 0.14; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'iterating': 0.16; 'shorten': 0.16; 'subject:requests': 0.16; 'wrote:': 0.18; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'could': 0.34; 'charset:us-ascii': 0.36; 'list': 0.37; 'skip:[ 10': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:50.22': 0.84 |
| Date | Thu, 3 Oct 2013 11:42:05 -0500 |
| From | Tim Chase <python.list@tim.thechases.com> |
| To | python-list@python.org |
| Subject | Re: feature requests |
| In-Reply-To | <CAPTjJmpiiKtTioZ+kaZ12-Rk=Cre2iJubDE8CCuoJqq9YUxQNg@mail.gmail.com> |
| References | <6782f295-1885-4114-aea8-d785480f3489@googlegroups.com> <CAPTjJmpiiKtTioZ+kaZ12-Rk=Cre2iJubDE8CCuoJqq9YUxQNg@mail.gmail.com> |
| X-Mailer | Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - boston.accountservergroup.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - tim.thechases.com |
| X-Get-Message-Sender-Via | boston.accountservergroup.com: none |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.681.1380818429.18130.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1380818430 news.xs4all.nl 15878 [2001:888:2000:d::a6]:39652 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:55420 |
Show key headers only | View raw
On 2013-10-04 02:21, Chris Angelico wrote:
> > workers = []
> > for params in whatever:
> > thread = threading.Thread(params)
> > thread.start()
> > workers.append(thread)
>
> You could shorten this by iterating twice, if that helps:
>
> workers = [Thread(params).start() for params in whatever]
> for thrd in workers: thrd.start()
Do you mean
workers = [Thread(params) for params in whatever]
for thrd in workers: thrd.start()
? ("Thread(params)" vs. "Thread(params).start()" in your list comp)
-tkc
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
feature requests macker <tester.testerus@gmail.com> - 2013-10-03 09:12 -0700
Re: feature requests Chris Angelico <rosuav@gmail.com> - 2013-10-04 02:21 +1000
Re: feature requests Tim Chase <python.list@tim.thechases.com> - 2013-10-03 11:42 -0500
Re: feature requests Chris Angelico <rosuav@gmail.com> - 2013-10-04 02:42 +1000
Re: feature requests Ethan Furman <ethan@stoneleaf.us> - 2013-10-03 10:01 -0700
Re: feature requests macker <tester.testerus@gmail.com> - 2013-10-05 05:49 -0700
Re: feature requests Ethan Furman <ethan@stoneleaf.us> - 2013-10-05 08:58 -0700
Re: feature requests Terry Reedy <tjreedy@udel.edu> - 2013-10-05 17:56 -0400
csiph-web