diff --git a/include/pybind11/stl_bind.h b/include/pybind11/stl_bind.h index 22a29b476f..91cfb93a90 100644 --- a/include/pybind11/stl_bind.h +++ b/include/pybind11/stl_bind.h @@ -674,11 +674,11 @@ class_ bind_map(handle scope, const std::string &name, Args && Class_ cl(scope, name.c_str(), pybind11::module_local(local), std::forward(args)...); class_ keys_view( - scope, ("KeysView[" + name + "]").c_str(), pybind11::module_local(local)); + scope, ("KeysView_" + name).c_str(), pybind11::module_local(local)); class_ values_view( - scope, ("ValuesView[" + name + "]").c_str(), pybind11::module_local(local)); + scope, ("ValuesView_" + name).c_str(), pybind11::module_local(local)); class_ items_view( - scope, ("ItemsView[" + name + "]").c_str(), pybind11::module_local(local)); + scope, ("ItemsView_" + name).c_str(), pybind11::module_local(local)); cl.def(init<>());