From 51a79b1af7fa663bb078136611705c04df12970a Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Tue, 21 Jul 2020 00:01:22 -0700 Subject: add coroutine behavior for generators coroutines don't have __next__; they also call themselves coroutines. This does not change the fact that `async def` methods are generators, but it does make them behave more like CPython. --- py/runtime0.h | 1 + 1 file changed, 1 insertion(+) (limited to 'py/runtime0.h') diff --git a/py/runtime0.h b/py/runtime0.h index a8089ea64..fb35c8a9f 100644 --- a/py/runtime0.h +++ b/py/runtime0.h @@ -33,6 +33,7 @@ #define MP_SCOPE_FLAG_VARKEYWORDS (0x02) #define MP_SCOPE_FLAG_GENERATOR (0x04) #define MP_SCOPE_FLAG_DEFKWARGS (0x08) +#define MP_SCOPE_FLAG_ASYNC (0x10) // types for native (viper) function signature #define MP_NATIVE_TYPE_OBJ (0x00) -- cgit v1.2.3