This is a development version (9.14.0.dev) and may be unstable. Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.14.0.dev / IPython / core / async_helpers / _should_be_async

function

IPython.core.async_helpers:_should_be_async

source: /IPython/core/async_helpers.py :138

Signature

def   _should_be_async ( cell : str )  →  bool

Summary

Detect if a block of code needs to be wrapped in an async def

Extended Summary

If the code block has a top-level return statement or is otherwise invalid, False will be returned.

Aliases

  • IPython.core.async_helpers._should_be_async