#13119: ._apply_module_morphism() in combinat/free_module.py doesn't handle zero
element properly
---------------------------------+------------------------------------------
       Reporter:  zabrocki       |         Owner:  sage-combinat   
           Type:  defect         |        Status:  needs_review    
       Priority:  minor          |     Milestone:  sage-5.6        
      Component:  combinatorics  |    Resolution:                  
       Keywords:                 |   Work issues:                  
Report Upstream:  N/A            |     Reviewers:  Travis Scrimshaw
        Authors:  Mike Zabrocki  |     Merged in:                  
   Dependencies:                 |      Stopgaps:                  
---------------------------------+------------------------------------------
Changes (by tscrim):

  * reviewer:  => Travis Scrimshaw


Old description:

> a potential defect in ._apply_module_morphism function calls list(
> self.basis().keys() ) when self.is_zero() is True.  This works fine if
> self.basis() is a finite set, but causes a problem if self.basis() is an
> infinite set with an iteration function.   In this case, the function
> hangs trying to list the infinite set.

New description:

 a potential defect in ._apply_module_morphism function calls list(
 self.basis().keys() ) when self.is_zero() is True.  This works fine if
 self.basis() is a finite set, but causes a problem if self.basis() is an
 infinite set with an iteration function.   In this case, the function
 hangs trying to list the infinite set.

 -----

 Apply only: [attachment:trac_13119_apply_module_morphism_bugfix-mz.patch]

--

Comment:

 Hey Mike,

 Two minor things:
 - Could you use the auto-linking {{{:func:`on_basis`}}} in the docstring?
 - Since at some point, there is a shift to Python 3, I think we should
 start using that syntax:
 {{{
 raise ValueError('Codomain could not be determined')
 }}}
 Looks good to me otherwise.

 Thanks,[[BR]]
 Travis

 For patchbot:

 Apply only: trac_13119_apply_module_morphism_bugfix-mz.patch

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