# Ticket #12946: trac_12946-review.patch

File trac_12946-review.patch, 1.2 KB (added by mhansen, 10 years ago)

Removing some garbage from the top of the file

• ## sage/combinat/composition.py

```# HG changeset patch
# User Andrew Mathas <andrew.mathas at sydney.edu.au>
# Date 1345621579 -36000
# Node ID 1aa928fca2a7dc19b8950f25b672ed7b4c2f6e58
# Parent  da198d4b9e496b363a9c370f4627bdd2cacbc574
#12946: Bug in Compositions (fix when inner keyword is a composition)

diff --git a/sage/combinat/composition.py b/sage/combinat/composition.py```
 a def Compositions(n=None, **kwargs): [[1, 3], [1, 2, 1]] sage: Compositions(4, inner=[1,1,1]).list() [[2, 1, 1], [1, 2, 1], [1, 1, 2], [1, 1, 1, 1]] sage: Compositions(4, inner=Composition([1,2])).list() [[2, 2], [1, 3], [1, 2, 1]] sage: Compositions(4, min_slope=0).list() [[4], [2, 2], [1, 3], [1, 1, 2], [1, 1, 1, 1]] sage: Compositions(4, min_slope=-1, max_slope=1).list() def Compositions(n=None, **kwargs): del kwargs['outer'] if 'inner' in kwargs: inner = kwargs['inner'] inner = list(kwargs['inner']) kwargs['floor'] = inner del kwargs['inner'] # Should this be handled by integer lists lex?