bytecodealliance / componentize-py

Apache License 2.0
147 stars 16 forks source link

append `Raises` line to function docstrings as appropriate #55

Closed dicej closed 8 months ago

dicej commented 8 months ago

If the WIT representation of a function returns result<A,B>, then we generate a Python function that returns A and raises Err(B). Since there's currently no way of representing the Err(B) part in the function's signature, we do the next best thing: put it in the docstring.

Fixes #53