basilisp
basilisp copied to clipboard
Fetch Var docstrings for `defn` forms from `fn.__doc__`
Right now, functions generated via Basilisp do not have docstrings. Instead, they are generated like:
def f():
return None
Var.intern(..., meta=lmap.map({"doc": "a docstring"}))
We could potentially improve utility on the Python side if we added the docstrings to the Python functions directly and then just fetched them from the __doc__
function attribute later.
Of course, there is a small risk that the docstring won't exist if the user has specified to start Python in "optimized" mode (-OO
flag).