[Python-Dev] Re: Starting a new thread

2022-05-12 Thread Serhiy Storchaka
10.05.22 18:12, Barney Stratford пише: This has a couple of advantages. I don’t have to import the threading module all over my code. I can use the neater syntax of function calls. The function’s definition makes it clear it’s returning a new thread since it’s decorated. It gets the plumbing o

[Python-Dev] Re: Starting a new thread

2022-05-12 Thread Cameron Simpson
On 12May2022 20:17, Barney Stratford wrote: >It seems like the consensus is that this is a good idea, but it’s the >wrong good idea. Should I cancel the PR or should we try to make it >into a better good idea? Why not shift slightly? As remarked, having a function automatically spawn threads c

[Python-Dev] Re: Starting a new thread

2022-05-12 Thread Guido van Rossum
It’s definitely too early for a PR, so if you already have one (I didn’t see one linked to this thread) please close it. Then once we’ve bikeshedded the right good idea you can start a new PR. On Thu, May 12, 2022 at 12:21 Barney Stratford wrote: > It seems like the consensus is that this is a

[Python-Dev] Re: Starting a new thread

2022-05-12 Thread Barney Stratford
It seems like the consensus is that this is a good idea, but it’s the wrong good idea. Should I cancel the PR or should we try to make it into a better good idea? Cheers, Barney. ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send

[Python-Dev] Re: Starting a new thread

2022-05-12 Thread Antoine Pitrou
On Tue, 10 May 2022 16:12:13 +0100 Barney Stratford wrote: > Hello all. > > It occurs to me that creating threads in Python is more awkward than it needs > to be. Every time I want to start a new thread, I end up writing the same > thing over and over again: > > def target(*args, **kwds): >