#15163: sum() in the console is overshadowed by symbolic_sum() ?
-----------------------------+-----------------------------
   Reporter:  darij          |            Owner:
       Type:  defect         |           Status:  new
   Priority:  major          |        Milestone:  sage-5.12
  Component:  PLEASE CHANGE  |         Keywords:  prelude
  Merged in:                 |          Authors:
  Reviewers:                 |  Report Upstream:  N/A
Work issues:                 |           Branch:
     Commit:                 |     Dependencies:
   Stopgaps:                 |
-----------------------------+-----------------------------
 {{{
 sage: c31 = Composition([3,1])
 sage: sum(c31)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 <ipython-input-5-cd64b2e19a3e> in <module>()
 ----> 1 sum(c31)

 /home/darij/sage-5.11.beta3/local/lib/python2.7/site-
 packages/sage/misc/functional.pyc in symbolic_sum(expression, *args,
 **kwds)
     652     """
     653     if hasattr(expression, 'sum'):
 --> 654         return expression.sum(*args, **kwds)
     655     elif len(args) <= 1:
     656         return sum(expression, *args)

 TypeError: sum() takes exactly 1 argument (0 given)
 }}}
 This should instead return 4 (the sum of the entries of the composition
 c31). This bug appears only interactively; in methods sum() is fine.

--
Ticket URL: <http://trac.sagemath.org/ticket/15163>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to