What is the list of attributes that need to be passed on to faithfully
reconstruct a Symbol?

Most sympy classes can be reconstructed as follows

foo == type(foo)(*foo.args)

Some classes break this rule.  For example

i = Integer(3)
i == type(i)(i.p)

r = Rational(2, 3)
r == type(r)(r.p, r.q)

I thought i could do the same thing with symbol

s = Symbol('x')
s == type(s)(s.name)

but it doesn't work with old assumptions

s = Symbol('x', positive=True)
s != type(s)(s.name)

What is the list of attributes that need to be passed on to faithfully
reconstruct a Symbol?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to