On Mon, Mar 10, 2008 at 6:30 AM, vgermrk <[EMAIL PROTECTED]> wrote: > > Since the preparser replaces "^" with "**" (which is good!), > i want a way to access the python-buildin-XOR again. > > I suggested in IRC that the preparser should also replace "xor" with > "^", > so that one can do "5 xor 3". > But since i did not convince everybody (on IRC), let's discuss here > about it.
What are the main counterarguments? I expect the main issue is with avoiding excessive divergence from Python syntax, though I think this is a special case as Sage has already overridden Python's native xor binary operator. Are there operator precedence issues here? Having "xor" as a binary operator does fit with the native "and" and "or", and Sage programmers are probably more likely than random programmers to want to make use of "xor" and "implies" in their conditional logic. For the record, Maple has all of "and", "or", "xor", and "implies" as binary operators. Steve --~--~---------~--~----~------------~-------~--~----~ 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/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
