Le vendredi 30 avril 2010 à 14:23 -0700, Ondrej Certik a écrit :
> On Fri, Apr 30, 2010 at 6:26 AM, jegerjensen <jensen.oyv...@gmail.com> wrote:
> >> Also, shouldn't this go into sympy.core?
> >>
> >> Ondrej
> >> """
> >
> > That is probably a good idea.  Where should we put the decorator
> > _tuple_wrapper? Or should the decorator be removed?  We could instead
> > let sympify() wrap the tuples.
> 
> So this patch is +1 from me. Do you think you can upload it into
> github? I'll try to merge it using github tools, just to learn it.
> 
> We can move it into the core in some other package. What is the idea
> behind SymTuple? Why is it needed? Can this be added into it's class
> docstring, together with some example?

Wait. From what I understand, this patch defeats the purpose of having a
Tuple type, which is to avoid encountering a non-sympy type such as
tuple when walking an expression tree. This makes SymTuple(a_tuple).args
= (a_tuple,). 

There are 2 fundamental invariants that all instances of Basic should
obey: obj.func(*obj.args) == obj and all(isinstance(x, Basic) for x in
obj.args). The fact that some objects (Integral, etc.) break this is a
serious annoyance and SymTuple should be part of the solution.




-- 
You received this message because you are subscribed to the Google Groups 
"sympy-patches" group.
To post to this group, send email to sympy-patc...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-patches?hl=en.

Reply via email to