@@ -33,17 +33,23 @@ namespace libsemigroups {
3333 // Undefined
3434 // //////////////////////////////////////////////////////////////////////
3535
36- py::class_<Undefined>(m, " Undefined" )
36+ py::class_<Undefined>(m, " Undefined" , R"pbdoc(
37+ The type of :any:`UNDEFINED`.
38+
39+ This class is the type of the constant value :any:`UNDEFINED`, and appears as
40+ such in type annotations in ``libsemigroups_pybind11``.
41+ )pbdoc" )
3742 .def (" __repr__" ,
3843 [](Undefined const & val) -> std::string { return " UNDEFINED" ; })
3944 .def (py::self < Undefined ())
45+ // TODO doesn't yet exist .def(py::self <= Undefined())
4046 .def (
4147 " __eq__" ,
4248 [](Undefined const & lhop, Undefined const & rhop) -> bool {
4349 return true ;
4450 },
4551 py::is_operator ())
46- .def (" __hash__" , [](Undefined const & op) -> int {
52+ .def (" __hash__" , [](Undefined const & op) {
4753 return std::hash<uint64_t >{}(static_cast <uint64_t >(op));
4854 });
4955
@@ -53,15 +59,26 @@ namespace libsemigroups {
5359 // PositiveInfinity
5460 // //////////////////////////////////////////////////////////////////////
5561
56- py::class_<PositiveInfinity>(m, " PositiveInfinity" )
62+ py::class_<PositiveInfinity>(m,
63+ " PositiveInfinity" ,
64+ R"pbdoc(
65+ The type of :any:`POSITIVE_INFINITY`.
66+
67+ This class is the type of the constant value :any:`POSITIVE_INFINITY`, and appears as
68+ such in type annotations in ``libsemigroups_pybind11``.
69+ )pbdoc" )
5770 .def (" __repr__" ,
5871 [](PositiveInfinity const & val) -> std::string {
5972 return u8" +\u221E " ;
6073 })
6174 .def (pybind11::self < PositiveInfinity ())
75+ // .def(pybind11::self <= PositiveInfinity())
6276 .def (pybind11::self < NegativeInfinity ())
77+ // .def(pybind11::self <= NegativeInfinity()) TODO not implemented
6378 .def (pybind11::self < int ())
79+ // .def(pybind11::self <= int()) TODO not implemented
6480 .def (int () < pybind11::self)
81+ // .def(int() <= pybind11::self) TODO not implemented
6582 .def (
6683 " __eq__" ,
6784 [](PositiveInfinity const & lhop,
@@ -82,7 +99,14 @@ namespace libsemigroups {
8299 // NegativeInfinity
83100 // //////////////////////////////////////////////////////////////////////
84101
85- py::class_<NegativeInfinity>(m, " NegativeInfinity" )
102+ py::class_<NegativeInfinity>(m,
103+ " NegativeInfinity" ,
104+ R"pbdoc(
105+ The type of :any:`NEGATIVE_INFINITY`.
106+
107+ This class is the type of the constant value :any:`NEGATIVE_INFINITY`, and appears as
108+ such in type annotations in ``libsemigroups_pybind11``.
109+ )pbdoc" )
86110 .def (" __repr__" ,
87111 [](NegativeInfinity const & val) -> std::string {
88112 return u8" -\u221E " ;
@@ -106,7 +130,14 @@ namespace libsemigroups {
106130 // LimitMax
107131 // //////////////////////////////////////////////////////////////////////
108132
109- py::class_<LimitMax>(m, " LimitMax" )
133+ py::class_<LimitMax>(m,
134+ " LimitMax" ,
135+ R"pbdoc(
136+ The type of :any:`LIMIT_MAX`.
137+
138+ This class is the type of the constant value :any:`LIMIT_MAX`, and appears as
139+ such in type annotations in ``libsemigroups_pybind11``.
140+ )pbdoc" )
110141 .def (" __repr__" ,
111142 [](LimitMax const & val) -> std::string { return " LIMIT_MAX" ; })
112143 .def (pybind11::self < LimitMax ())
0 commit comments