Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

yield_inside_async_function_py36.py 327B

123456789101112
  1. """Test that `yield` or `yield from` can't be used inside an async function."""
  2. # pylint: disable=missing-docstring, unused-variable
  3. async def good_coro():
  4. def _inner():
  5. yield 42
  6. yield from [1, 2, 3]
  7. async def bad_coro():
  8. yield 42
  9. yield from [1, 2, 3] # [yield-inside-async-function]