On Fri, Oct 4, 2013 at 2:12 AM, macker <tester.teste...@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 -- https://mail.python.org/mailman/listinfo/python-list