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

Commit

Permalink
Trac 19016: more robust doctest (see #19488)
Browse files Browse the repository at this point in the history
  • Loading branch information
videlec committed Oct 27, 2015
1 parent 81012bc commit c7b4f0e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/sage/combinat/crystals/affine.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,15 +571,15 @@ def __cmp__(self, other):
sage: c = K(rows=[[2]])
sage: cmp(b,c)
-1
sage: cmp(b,1)
-1
sage: cmp(b,b)
0
"""
if parent(self) is parent(other):
return cmp(self.value, other.value)
else:
return cmp(parent(self), parent(other))
If the parent are different, it uses comparison of the parents::
sage: cmp(b,1) == cmp(b.parent(), ZZ)
True
"""
return cmp(parent(self), parent(other)) or cmp(self.value, other.value)

AffineCrystalFromClassical.Element = AffineCrystalFromClassicalElement

Expand Down

0 comments on commit c7b4f0e

Please sign in to comment.