Re: feature requests

2013-10-05 Thread Terry Reedy
On 10/5/2013 11:58 AM, Ethan Furman wrote: On 10/05/2013 05:49 AM, macker wrote: Ugly, menial lines are a clue that a function to hide it could be useful. Or a clue to add a trivial change elsewhere (hint for Ethan: `return self` at the end of `Thread.start()`). I'm aware that would solve y

Re: feature requests

2013-10-05 Thread Ethan Furman
On 10/05/2013 05:49 AM, macker wrote: Ugly, menial lines are a clue that a function to hide it could be useful. Or a clue to add a trivial change elsewhere (hint for Ethan: `return self` at the end of `Thread.start()`). I'm aware that would solve your issue. I'm also aware that Python rare

Re: feature requests

2013-10-05 Thread macker
> > Ugly, menial lines are a clue that a function to hide it could be useful. Or a clue to add a trivial change elsewhere (hint for Ethan: `return self` at the end of `Thread.start()`). > Have you verified that this is a problem in Python? ? > You could try subclassing. I could try many thin

Re: feature requests

2013-10-03 Thread Ethan Furman
On 10/03/2013 09:12 AM, macker wrote: Hi, hope this is the right group for this: I miss two basic (IMO) features in parallel processing: 1. make `threading.Thread.start()` return `self` I'd like to be able to `workers = [Thread(params).start() for params in whatever]`. Right now, it's 5 ugly,

Re: feature requests

2013-10-03 Thread Chris Angelico
On Fri, Oct 4, 2013 at 2:42 AM, Tim Chase wrote: > 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) Whoops, copy/paste fail. Yes, that's what I meant. Thanks for catc

Re: feature requests

2013-10-03 Thread Tim Chase
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: > > worke

Re: feature requests

2013-10-03 Thread Chris Angelico
On Fri, Oct 4, 2013 at 2:12 AM, macker 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) > thre

feature requests

2013-10-03 Thread macker
Hi, hope this is the right group for this: I miss two basic (IMO) features in parallel processing: 1. make `threading.Thread.start()` return `self` I'd like to be able to `workers = [Thread(params).start() for params in whatever]`. Right now, it's 5 ugly, menial lines: workers = []