Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #55419

Re: feature requests

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'skip:[ 20': 0.04; 'lines:': 0.09; 'params': 0.09; 'thread': 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'iterating': 0.16; 'shorten': 0.16; 'subject:requests': 0.16; 'wrote:': 0.18; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'fri,': 0.33; "i'd": 0.34; 'could': 0.34; 'received:google.com': 0.35; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'ugly,': 0.84; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0c3bKQyFMxb5asYESgusL52Et/uVpoaQMLYarlNCnbY=; b=MYIF4BLZ2Gqgn1umYq2FfQrlVZlwJ3FD/LKGNd1+2V2uMmmwPfSMllVFP7guKV7FXJ ReLZEgBvL5Vzr0ozWunpTHY/7GoRT3XIdW4JKD+9EbTnPywLzIrbJ4Xymf0ho4WYHUYC OFxjPdRtmXVF/iyRxaJ1/yDLk0M+XfFpWHkAr8ZTbABaycMcUiRGMiy7c03ym4n0JPio ymHFdPiBe6RIUwLHf4DoSzjHkq/sxK91c4a5qKM+B38gTA6Wu7sGoSLxBD1UubgtINVT IF/r+Pe2Zx4w8rRiv2ZMXCEao/jGDoscegKrahxRrZ6Xu/JnBda5GjggLUXBTQ+baRTD myTw==
MIME-Version 1.0
X-Received by 10.67.4.197 with SMTP id cg5mr10436544pad.10.1380817273869; Thu, 03 Oct 2013 09:21:13 -0700 (PDT)
In-Reply-To <6782f295-1885-4114-aea8-d785480f3489@googlegroups.com>
References <6782f295-1885-4114-aea8-d785480f3489@googlegroups.com>
Date Fri, 4 Oct 2013 02:21:13 +1000
Subject Re: feature requests
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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.680.1380817277.18130.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1380817277 news.xs4all.nl 15963 [2001:888:2000:d::a6]:36361
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:55419

Show key headers only | View raw


On Fri, Oct 4, 2013 at 2:12 AM, macker <tester.testerus@gmail.com> wrote:
> I'd like to be able to `workers = [Thread(params).start() for params in whatever]`. Right now, it's 5 ugly, menial lines:
>
>         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()

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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