#12541: Remove Sequence test in span
------------------------------+---------------------------------------------
   Reporter:  novoselt        |          Owner:  jason, was        
       Type:  defect          |         Status:  needs_info        
   Priority:  minor           |      Milestone:  sage-5.0          
  Component:  linear algebra  |       Keywords:                    
Work_issues:                  |       Upstream:  N/A               
   Reviewer:  Rob Beezer      |         Author:  Andrey Novoseltsev
     Merged:                  |   Dependencies:                    
------------------------------+---------------------------------------------
Changes (by rbeezer):

  * status:  needs_review => needs_info


Comment:

 I find the error message in the doctest still somewhat cryptic.  Here's a
 simplified explanation of what happens:

 {{{
 sage: span(QQ, [0])
 ---------------------------------------------------------------------------
 AttributeError                            Traceback (most recent call
 last)
 <snip>
 AttributeError: 'sage.rings.integer_ring.IntegerRing_class' object has no
 attribute 'span'
 }}}

 It appears that the span() '''function''' in free_module.pyx  mostly tries
 to find an appropriate parent for the generators, and then hands
 everything off to the .span() '''method''' of the parent.

 So here, the integer zero is construed to be the first generator, and the
 class of integers has no span method.

 What do you think of checking if the first generator is a list, or if it
 is a free module element (`is_FreeModuleElement`), before proceeding with
 a supposed parent?  This would allow an informative error message, such as
 - "generators must be lists of ring elements, or free module elements"

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12541#comment:14>
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