From 57070fb0a084e40ceab8a9f80b9e4436a48b9e53 Mon Sep 17 00:00:00 2001 From: Sergei Izmailov Date: Sat, 16 May 2020 17:28:29 +0300 Subject: [PATCH] Render py::iterator/py::iterable as Iterator/Iterable in docstrings --- include/pybind11/cast.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index 2b382ddf..5384ecaf 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -1606,6 +1606,8 @@ template struct is_holder_type struct handle_type_name { static constexpr auto name = _(); }; template <> struct handle_type_name { static constexpr auto name = _(PYBIND11_BYTES_NAME); }; +template <> struct handle_type_name { static constexpr auto name = _("Iterable"); }; +template <> struct handle_type_name { static constexpr auto name = _("Iterator"); }; template <> struct handle_type_name { static constexpr auto name = _("*args"); }; template <> struct handle_type_name { static constexpr auto name = _("**kwargs"); };