Skip to content

Autocompletion for named arguments in Jupyter Notebook / IPython #990

Closed
@mlund

Description

@mlund

Issue description

In Jupyter Notebook or in IPython I can normally press tab inside a function to autocomplete named arguments, but I cannot make this work for the example below. I can explicitly name the arguments, i.e. add(first=2, second=3) but not begin typing sec...+tab to complete to second. Is there a way of achieve this?

Reproducible example code

#include <pybind11/pybind11.h>
int add(int i, int j) {
    return i + j;
}
namespace py = pybind11;
PYBIND11_PLUGIN(example) {
    using namespace pybind11::literals;
    py::module m("example", "pybind11 example plugin");
    m.def("add", &add, "A function which adds two numbers", "first"_a, "second"_a);
    return m.ptr();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions