Skip to content

Commit

Permalink
Fixing broken doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewMathas committed Jul 21, 2016
1 parent 9cd615d commit c1b57e6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/sage/combinat/root_system/cartan_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
['A', NN]
sage: print(CartanType(['A', NN]).ascii_art())
O---O---O---O---O---O---O---..
0 1 2 3
0 1 2 3 4 5 6
sage: CartanType(['A', ZZ])
['A', ZZ]
sage: print(CartanType(['A', ZZ]).ascii_art())
Expand Down Expand Up @@ -2407,13 +2407,12 @@ def __len__(self):
"""
EXAMPLES::
sage: len(CartanType(['A',4]))
2
sage: len(CartanType(['A',4,1]))
3
"""
if hasattr(self, 'affine'):
return 3
else:
return 2
return 3 if self.is_affine() else 2

def __getitem__(self, i):
"""
Expand Down

0 comments on commit c1b57e6

Please sign in to comment.