>> could also expand the class structure so that there is a base class to
>> Symbol that is only a string encapsulation, and subclasses for Symbol,
>> and other things like BooleanSymbol.
>
> Having a base class for named objects would be good, but it can only
> work for atoms, as non-atoms can't have strings in their args.

It seems that you are wrong about this. The idea of Symbol is exactly
that it provides a hack for having a name and not storing it in args.
See MatrixSymbol for instance. There is no algorithm in sympy that
should not consider it an atom, it has non-empty args, it has a name
that is not in its args.

So basically my question is. what do you prefer. Hacks like what is
done to the name string of Symbol or permitting non-Basic objects in
the args of the leafs of the sympy expression tree. Basically, the
presence of non-Basic objects in the args will be what defines the end
of the recursion.

@Aaron
> Why False?  Wouldn't atom(obj) == False mean that obj can be recursed
> into, which would not hold for non-Basic objects?
Yes, you are right, it should be True instead of False.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy?hl=en.

Reply via email to