Thanks for Mr David beazley's materials online, a beginner like me was able
to understand this thread from the beginning. Rarely do i get to understand
what the folks in here are rumbling about.
He was also teaching compiler theory at university. Don't know if he ever
contributed to CPython. Here'
On Thu, Feb 18, 2021 at 9:04 PM Guido van Rossum wrote:
> On Thu, Feb 18, 2021 at 8:23 PM Luciano Ramalho
> wrote:
>
>> Thanks for your reply, Guido.
>>
>> On Fri, Feb 19, 2021 at 12:07 AM Guido van Rossum
>> wrote:
>> > Reading the doc section you link to, it's pretty clear that
>> `@asyncio.c
I think that for this functionality (force the event loop to run), the
trampoline just needs to define a function that returns a magic value and
special-case that. The helper then becomes
def __sleep0():
await
The magic object may have to be something with an __await__() method.
On Fri, Feb
Hello,
On Fri, 19 Feb 2021 06:29:35 -0300
Luciano Ramalho wrote:
> On Fri, Feb 19, 2021 at 4:08 AM Guido van Rossum
> wrote:
> > Can you try this?
> >
> > async def __sleep(self):
> > await None
>
> That didn't work*, but this does:
>
> async def __sleep():
> return None
>
> Was th
On Fri, Feb 19, 2021 at 6:29 AM Luciano Ramalho wrote:
> async def __sleep():
> return None
Sorry, I meant to write:
async def __sleep0():
return None
Since the idea is to replace the generator-based coroutine `__sleep0`
in tasks.py [1] with a native coroutine.
[1]
https://github.com/
On Fri, Feb 19, 2021 at 4:08 AM Guido van Rossum wrote:
> Can you try this?
>
> async def __sleep(self):
> await None
That didn't work*, but this does:
async def __sleep():
return None
Was that the idea?
(*) TypeError: object NoneType can't be used in 'await' expression
>
> On Thu, Fe
On Fri, Feb 19, 2021 at 4:08 AM Guido van Rossum wrote:
> Can you try this?
>
> async def __sleep(self):
> await None
Perhaps you meant this?
async def __sleep0():
await None
Either way, `await None` raises "TypeError: object NoneType can't be
used in 'await' expression".
Maybe I mis
Can you try this?
async def __sleep(self):
await None
On Thu, Feb 18, 2021 at 22:31 Luciano Ramalho wrote:
> Follow up question: what's the plan to replace this use of
> `@types.coroutine` in `asyncio/tasks.py`? [1]
>
> @types.coroutine
> def __sleep0():
> ""
> yield
>
> [1]
>
Follow up question: what's the plan to replace this use of
`@types.coroutine` in `asyncio/tasks.py`? [1]
@types.coroutine
def __sleep0():
""
yield
[1] https://github.com/python/cpython/blob/master/Lib/asyncio/tasks.py#L585
Best,
Luciano
On Fri, Feb 19, 2021 at 2:31 AM Luciano Ram
On Fri, Feb 19, 2021 at 1:59 AM Guido van Rossum wrote:
>> 1) What Python construct is to be used at the end of a chain of await
>> calls, if not of a generator-based coroutine decorated with
>> `@types.coroutine` and using a `yield` expression in its body?
> At the end of the chain you can call
On Thu, Feb 18, 2021 at 8:23 PM Luciano Ramalho wrote:
> Thanks for your reply, Guido.
>
> On Fri, Feb 19, 2021 at 12:07 AM Guido van Rossum
> wrote:
> > Reading the doc section you link to, it's pretty clear that
> `@asyncio.coroutine` will be removed.
>
> The *Note* right at the top of [1] say
Thanks for your reply, Guido.
On Fri, Feb 19, 2021 at 12:07 AM Guido van Rossum wrote:
> Reading the doc section you link to, it's pretty clear that
> `@asyncio.coroutine` will be removed.
The *Note* right at the top of [1] says "Support for generator-based
coroutines is deprecated and is sched
On Thu, Feb 18, 2021 at 3:57 PM Luciano Ramalho wrote:
> I am not a Python core developer, but my question relates
> to changes that are expected in Python 3.10, so I felt this was the
> best forum to ask. Please let me know if I should discuss this
> elsewhere or file a documentation bug.
>
> Fi
13 matches
Mail list logo