It is convenient to know that all information about a term is in it's type
and it's .args.  This is true for *almost *all of sympy and it makes it
very convenient to interact with from other systems.  Any occasion where
this doesn't occur (e.g. Symbol, Integer, AppliedPredicate) ends up being a
huge headache when inter-operating with sympy.  Essentially whenever I hook
something else into sympy I tell it about type and .args.  Then I go and
special case every exception.

I interoperate with sympy a fair amount from external projects so I tend to
resist this this sort of solution pretty strongly.

Matrix Expressions is currently pure in this sense.  It serves as a nice
example of a very easy-to-deal-with system.


On Fri, Apr 25, 2014 at 10:34 AM, Clifford Wolf <cliffordvie...@gmail.com>wrote:

> On Friday, April 25, 2014 6:33:26 PM UTC+2, Matthew wrote:
>>
>> Regarding Symbol in MatrixSymbol what we really need is a Basic that just
>> holds a name/string.  The current Symbol object does that plus a whole lot
>> of other things that we don't need.  Probably we just need a String(Basic)
>> class or something similar.
>>
>
> Just thinking out loud: What's about storing the name directly
> in MatrixSymbol.name and overloading MatrixSymbol.func to [return a closure
> that] inject[s] the name into a new instance.
>
> This would make sense because afaics the whole idea behind the .args
> interface is make it easy to implement generic transformations, and I don't
> see why such transformations should ever want to change the name of a
> MatrixSymbol. In this sense the dimensions are the only 'arguments' to a
> MatrixSymbol. (The symbol name is afaics not an 'argument' of Symbol
> objects either.)
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/26b50466-8966-49e0-94d1-075011a6a063%40googlegroups.com<https://groups.google.com/d/msgid/sympy/26b50466-8966-49e0-94d1-075011a6a063%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAJ8oX-G7Pze_Z9im%2BWX2Tho7ao7a%3DTwSBiCHxMrL-2QmB6OAZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to