Skip to content

Fetch Var docstrings for defn forms from fn.__doc__ #357

Open
@chrisrink10

Description

@chrisrink10

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions