[Python-ideas] Fwd: [asyncio] Suggestion for a major PEP

2018-12-16 Thread Christophe Bailly
Hello everybody, I thought I had sent this mail to everybody, so here was my answer to Nathaniel, Regards, Chris -- Forwarded message - From: Christophe Bailly Date: Sun, 16 Dec 2018 at 13:56 Subject: Re: [Python-ideas] [asyncio] Suggestion for a major PEP To: Nathaniel Smith

Re: [Python-ideas] [asyncio] Suggestion for a major PEP

2018-12-16 Thread Greg Ewing
Christophe Bailly wrote: I copy paste the main idea from an article I have written: contextual async All of your examples there are C++. It's not clear how any of this relates to Python. Do we have the tools to do this ? Yes beca

Re: [Python-ideas] [asyncio] Suggestion for a major PEP

2018-12-16 Thread Christophe Bailly
Hello, Thanks for your answer. The advantage of this method is that you still follow the logic of async/await. In fact you make it even easier,. It is just a different implementation but with fewer constraints. So my suggestion is to keep this logic because it is a very good logic !!!. , But we

Re: [Python-ideas] [asyncio] Suggestion for a major PEP

2018-12-16 Thread Steven D'Aprano
On Sun, Dec 16, 2018 at 09:21:14AM +0100, Christophe Bailly wrote: > Async/Await logic has introduced a symetric relation wich introduces > unnecessary contraints. We should just the same logic as thread logic. I'm not an expert on async, but whenever I hear people saying "we should use (somethi

Re: [Python-ideas] [asyncio] Suggestion for a major PEP

2018-12-16 Thread Nathaniel Smith
If you want this style of concurrency, you don't need to write a PEP, just 'pip install gevent' :-) But unfortunately you're years too late to argue for making asyncio work this way. This was discussed extensively at the time, and the decision to use special syntax was made intentionally, and afte

[Python-ideas] [asyncio] Suggestion for a major PEP

2018-12-16 Thread Christophe Bailly
Hello, I copy paste the main idea from an article I have written: contextual async " Imagine you have some code written for monothread. And you want to include your code in a multithread environment. Do you need to adapt all your c