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

Commit

Permalink
Ticket 16465: fix graded component of degree 0
Browse files Browse the repository at this point in the history
  • Loading branch information
elixyre committed Jul 9, 2014
1 parent 90acf89 commit 33395c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sage/combinat/structures/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ def __classcall__(cls, grade=None, *args, **options):
Compositions of integers
sage: Compositions(4)
Compositions of integers of degree 4
sage: Compositions(0)
Compositions of integers of degree 0
"""
self = super(Structures, cls).__classcall__(cls, *args, **options)

if grade and grade in cls.grading_set():
if grade is not None and grade in cls.grading_set():
return self.graded_component(grade)
else: return self

Expand Down

0 comments on commit 33395c0

Please sign in to comment.