Skip to content

Commit 6596efa

Browse files
Fix FroidurePin signature
1 parent ad797ca commit 6596efa

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/froidure-pin.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,18 @@ namespace libsemigroups {
4242
using FroidurePin_ = FroidurePin<Element>;
4343

4444
std::string pyclass_name = std::string("FroidurePin") + name;
45-
py::class_<FroidurePin_, FroidurePinBase> thing(m,
46-
pyclass_name.c_str(),
47-
R"pbdoc(
45+
py::class_<FroidurePin_, FroidurePinBase> thing(
46+
m,
47+
pyclass_name.c_str(),
48+
// To change the top-level signature of a class, :sig=...: should be
49+
// specified here in the class docstring. This is most likely the
50+
// desired behaiour if a constructor is not overloaded.
51+
// If the constructor is overloaded and the signature of an individual
52+
// overload is to be changed, :sig=...: should be specifed in the
53+
// docstring of that py::init function.
54+
R"pbdoc(
55+
:sig=(self: FroidurePin, gens: List[Element]) -> None:
56+
4857
Class implementing the Froidure-Pin algorithm.
4958
5059
A :any:`FroidurePin` instance represents a semigroup or monoid defined by a

0 commit comments

Comments
 (0)