MCPcopy Index your code
hub / github.com/RustPython/RustPython / main

Function main

crates/wasm/Lib/asyncweb.py:51–57  ·  view source on GitHub ↗

A decorator to mark a function as main. This calls run() on the result of the function, and logs an error that occurs.

(async_func)

Source from the content-addressed store, hash-verified

49
50
51def main(async_func):
52 """
53 A decorator to mark a function as main. This calls run() on the
54 result of the function, and logs an error that occurs.
55 """
56 run(_main_wrapper(async_func()))
57 return async_func
58
59
60async def _main_wrapper(coro):

Callers

nothing calls this directly

Calls 3

_main_wrapperFunction · 0.85
async_funcFunction · 0.85
runFunction · 0.70

Tested by

no test coverage detected