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

Commit

Permalink
#12648: Species do not support renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhansen committed Jan 11, 2014
1 parent 13c5a49 commit bdad7a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sage/combinat/species/species.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def weighted(self, weight):
kwds.update({'weight': weight})
return self.__class__(*[args_dict[i] for i in range(len(args_dict))], **kwds)

def __repr__(self):
def _repr_(self):
"""
Returns a string representation of this species.
Expand All @@ -288,6 +288,11 @@ def __repr__(self):
sage: t = ZZ['t'].gen()
sage: species.SetSpecies(min=1, max=4, weight=t)
Set species with min=1, max=4, weight=t
sage: L = species.SetSpecies()
sage: L.rename('L'); L
L
sage: L.rename('Set species'); L
Set species
"""
if hasattr(self, "_name"):
name = self._name if isinstance(self._name, str) else self._name()
Expand Down

0 comments on commit bdad7a3

Please sign in to comment.