Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1483 by hastebrot: no xor in sympy.core.basic for new logic module
http://code.google.com/p/sympy/issues/detail?id=1483

I wonder why there is no xor in the new logic module, resp. in
sympy.core.basic. Is this intentional?

into sympy/core/basic.py:

     def __xor__(self, other):
         """Overloading for ^ operator"""
         from sympy.logic.boolalg import Or, And, Not
         return And(Or(self, other), Not(And(self, other)))

test it in the console:

     >>> a, b = symbols("ab")
     >>> a ^ b
     And(Or(a, b), Or(Not(a), Not(b)))

looks strange after normalisation.

I see the problem, that creating a Xor class into sympy.logic.boolalg (for
better readability) is redundant, since it uses fundamental logical
operators (and, or, not) which are already defined. so is it better to put
only the fundamental ones into the modules?


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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

Reply via email to