Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
using _repr_ in subword
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Mar 27, 2022
1 parent e411b13 commit c966ef1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sage/combinat/subword.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def __reduce__(self):
"""
return (Subwords_w, (self._w, self._build))

def __repr__(self) -> str:
def _repr_(self) -> str:
"""
TESTS::
Expand Down Expand Up @@ -372,14 +372,14 @@ def __reduce__(self):
"""
return (Subwords_wk, (self._w, self._k, self._build))

def __repr__(self) -> str:
def _repr_(self) -> str:
"""
TESTS::
sage: repr(Subwords([1,2,3],2)) # indirect doctest
'Subwords of [1, 2, 3] of length 2'
"""
return "{} of length {}".format(Subwords_w.__repr__(self), self._k)
return "{} of length {}".format(Subwords_w._repr_(self), self._k)

def __contains__(self, w) -> bool:
"""
Expand Down

0 comments on commit c966ef1

Please sign in to comment.