Closed leonardt closed 7 years ago
op1 + op2
op1 - op2
carry(op1 op op2, in=None, out=None)
trunc(op1 op op2)
- op1
op1 >>> op2
op1 & op2
op1 ~& op2
op1 | op2
op1 ~| op2
op1 ^ op2
op1 ~^ op2
op1 >> op2
op1 << op2
~ op1
reduce(op, op1)
not op1
~ reduce(or, op1)
op1 and op2
op1 or op2
op1 == op2
value[slice]
These seems like good set of ops.
Primitive Operations
Arith
op1 + op2
op1 - op2
Will defer until we can define good syntaxcarry(op1 op op2, in=None, out=None)
Will defer until we can define good syntaxtrunc(op1 op op2)
- op1
Syntax not supported by Pythonop1 >>> op2
Arithmetic shiftLogic
op1 & op2
Syntax not supported by Pythonop1 ~& op2
op1 | op2
Syntax not supported by Pythonop1 ~| op2
op1 ^ op2
Syntax not supported by Pythonop1 ~^ op2
op1 >> op2
op1 << op2
~ op1
Can be implemented using function syntaxreduce(op, op1)
not op1
can be implemented as~ reduce(or, op1)
op1 and op2
(Logical And)op1 or op2
(Logical or)op1 == op2
Misc
value[slice]