I have a class Vector where:
class Vector(Symbol):
def __init__(self,basis_str=None):
if isinstance(basis_str,Vector):
self = basis_str
else:
if basis_str == None or basis_str == '0':
self = S(0)
else:
Symbol.__init__(self,basis_str,commutative=False)
print self
print self.is_commutative
then:
er = Vector('er')
outputs my diagnostic print -
er
True
How do I subclass and get self.is_commutative = 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.