Le dimanche 28 mars 2010 à 20:50 -0600, Aaron S. Meurer a écrit :
> I do agree.  Two questions:
> 
> 1. Will this affect performance, using SymTuple instead of tuple, since we 
> use args to hash objects?  
> It probably won't, but I guess we should benchmark it to make sure.

Probably not. Note that we actually use _args to hash and there's no
need to change that. The easiest way to implement this would be to
define Integral.args to wrap the tuples in ._args with SymTuple. 

> 2. What would you use to replace the use of None in Integral, as in 
> Integral(f(x), (x, None, 1)) 
> represents the integral of f(x) evaluated at y?  
> 

That's a weird object - actually not an integral but a specific
primitive of -f. So I would transform it into something else: Lambda(y,
Integral(f(x), (x, y, 1))) or something like that.

> I don't think any other classes use non-Basics, except for internal classes 
> like Poly.  
> 
> Aaron Meurer
> On Mar 28, 2010, at 8:44 PM, Ronan Lamy wrote:
> 
> > Well, I think that everything should have Basic args. There's a comment
> > in the code somewhere to that effect and that's an invariant we should
> > respect scrupulously, together with expr.func(*expr.args) == expr. 
> > 
> > tuples should be replaced with a Tuple type (SymTuple in secondquant.py
> > is basically what we need). For atoms, I guess consistency requires
> > atom.args = (atom,). There's a difficulty with True, False and None
> > which can all arise in the same places as Basic objects, but it's
> > possible to ensure that they never appear in the args of any object.
> > 
> > Ronan
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "sympy" group.
> > To post to this group, send email to sy...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > sympy+unsubscr...@googlegroups.com.
> > For more options, visit this group at 
> > http://groups.google.com/group/sympy?hl=en.
> > 
> 


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

Reply via email to