#7537: list(SR('c').iterator()) is empty
-------------------------+--------------------------------------------------
   Reporter:  malb       |       Owner:  burcin    
       Type:  defect     |      Status:  new       
   Priority:  critical   |   Milestone:  sage-4.3.4
  Component:  symbolics  |    Keywords:            
     Author:             |    Upstream:  N/A       
   Reviewer:             |      Merged:            
Work_issues:             |  
-------------------------+--------------------------------------------------

Comment(by burcin):

 I don't think this is a bug. :)

 It doesn't make sense to iterate over variables, constants or numeric
 coefficients. Iterators are only available over `add`, `mul`, and `pow`
 objects, which correspond to the obvious mathematical operations.

 AFAICT, this is also the case in MMA:

 {{{
 Mathematica 7.0 for Linux x86 (32-bit)
 Copyright 1988-2008 Wolfram Research, Inc.

 In[1]:= T=x+1
 Out[1]= 1 + x
 In[2]:= T
 Out[2]= 1 + x
 In[3]:= T[[1]]
 Out[3]= 1
 In[4]:= X
 Out[4]= X
 In[5]:= X[[1]]
 Part::partd: Part specification X[[1]] is longer than depth of object.
 Out[5]= X[[1]]
 }}}

 We can raise a `ValueError` if the expression corresponds to a `symbol`,
 `constant` or `numeric` object. The docstring should also be enhanced to
 point to the data structure for symbolic expressions here:

 http://www.ginac.de/tutorial/Internal-representation-of-products-and-
 sums.html

 Comments?

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