Skip to content

Commit d539c62

Browse files
Rename to_string -> to_human_readable_repr for BMat8 + AhoCorasick (#219)
* Rename to_string -> to_human_readable_repr for BMat8 + AhoCorasick * Fix last * Change auto -> AhoCorasick --------- Co-authored-by: Joseph Edwards <josephdavidedwards@gmail.com>
1 parent a67b86b commit d539c62

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/aho-corasick.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ Several helper functions are provided in the ``aho_corasick`` module, documented
6363
:doc:`here <helpers>`.
6464
)pbdoc");
6565

66-
thing.def("__repr__", &to_string);
66+
thing.def("__repr__",
67+
[](AhoCorasick const& ac) { return to_human_readable_repr(ac); });
6768

6869
thing.attr("root") = &AhoCorasick::root;
6970

src/bmat8.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ the submodule ``bmat8``.
131131
// 2. (self: _libsemigroups_pybind11.FroidurePinBase, w: List[int]) -> int
132132
// 3. (self: _libsemigroups_pybind11.FroidurePinBase, i: int) -> int
133133
thing2.def("__len__", [](BMat8 const& x) { return 8; });
134-
thing2.def("__repr__", [](BMat8 const& x) { return to_string(x, "[]"); });
134+
thing2.def("__repr__",
135+
[](BMat8 const& x) { return to_human_readable_repr(x, "[]"); });
135136
thing2.def(
136137
"__setitem__",
137138
[](BMat8& x, std::pair<size_t, size_t> tup, bool val) {

0 commit comments

Comments
 (0)