#12946: Bug in Compositions
----------------------------------+-----------------------------------------
       Reporter:  chrisjamesberg  |         Owner:  tbd          
           Type:  defect          |        Status:  needs_review 
       Priority:  minor           |     Milestone:  sage-5.3     
      Component:  combinatorics   |    Resolution:               
       Keywords:  Compositions    |   Work issues:               
Report Upstream:  N/A             |     Reviewers:  Andrew Mathas
        Authors:  Mike Hansen     |     Merged in:               
   Dependencies:                  |      Stopgaps:               
----------------------------------+-----------------------------------------
Changes (by andrew.mathas):

  * reviewer:  => Andrew Mathas


Comment:

 The documentation on what outer and inner do is not particularly clear to
 me, so so I think that it would not hurt to explain this better, but I'll
 leave that decision up to you.

 More importantly, the patch doesn't work when inner is a composition, so I
 am marking the patch as `needs work`:

 {{{

 sage: Compositions(4, inner=Composition([3,1,2])).list()
 ---------------------------------------------------------------------------
 Traceback (most recent call last):

 TypeError: 'Composition_class' object is not callable


 }}}

 Of course, the fix is trivial: as you did with outer you need to replace
 line 984 with:
 {{{
 inner = list(kwargs['inner'])
 }}}

 Cheers,
 Andrew

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12946#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to