Skip to content

Commit

Permalink
deprecate compact argument
Browse files Browse the repository at this point in the history
  • Loading branch information
a-andre committed Oct 13, 2014
1 parent 2e4f269 commit cf77bc2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/sage/combinat/partition.py
Expand Up @@ -642,7 +642,7 @@ def __init__(self, parent, mu):
else:
raise ValueError("%s is not a valid partition"%repr(mu))

def _repr_(self):
def _repr_(self, compact=None):
r"""
Return a string representation of ``self`` depending on
:meth:`Partitions.global_options`.
Expand Down Expand Up @@ -706,6 +706,10 @@ def _repr_(self):
sage: Partitions.global_options.reset()
"""
if compact is not None:
from sage.misc.superseded import deprecation
deprecation(16933, 'compact argument is deprecated.')

return self.parent().global_options.dispatch(self, '_repr_', 'display')

def _ascii_art_(self):
Expand Down
6 changes: 5 additions & 1 deletion src/sage/combinat/partition_tuple.py
Expand Up @@ -484,7 +484,7 @@ def __len__(self):
"""
return self.level()

def _repr_(self):
def _repr_(self, compact=None):
"""
Return a string representation of ``self`` depending on
:meth:`PartitionTuples.global_options`.
Expand Down Expand Up @@ -526,6 +526,10 @@ def _repr_(self):
2, 1 | 3, 2 | 1^3
sage: PartitionTuples.global_options.reset()
"""
if compact is not None:
from sage.misc.superseded import deprecation
deprecation(16933, 'compact argument is deprecated.')

return self.parent().global_options.dispatch(self, '_repr_', 'display')

def _repr_diagram(self):
Expand Down

0 comments on commit cf77bc2

Please sign in to comment.