MCPcopy Index your code
hub / github.com/python/cpython / isfuture

Function isfuture

Lib/asyncio/base_futures.py:13–21  ·  view source on GitHub ↗

Check for a Future. This returns True when obj is a Future instance or is advertising itself as duck-type compatible by setting _asyncio_future_blocking. See comment in Future for more details.

(obj)

Source from the content-addressed store, hash-verified

11
12
13def isfuture(obj):
14 """Check for a Future.
15
16 This returns True when obj is a Future instance or is advertising
17 itself as duck-type compatible by setting _asyncio_future_blocking.
18 See comment in Future for more details.
19 """
20 return (hasattr(obj.__class__, '_asyncio_future_blocking') and
21 obj._asyncio_future_blocking is not None)
22
23
24def _format_callbacks(cb):

Callers 3

_chain_futureFunction · 0.85
_set_stateFunction · 0.85
wrap_futureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…