return (a1, (a2, stack))
-def BinaryLogicWrapper(f):
+def BinaryLogicWrapper(f, name=None):
'''
Wrap functions that take two numbers and return a single result.
'''
result = f(b, a)
return (result, stack), expression, dictionary
+ if name:
+ BinaryLogicWrapper_inner.__name__ = name
+
return BinaryLogicWrapper_inner
##╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝
UnaryWrapper(bool), # Convert any value to Boolean.
# (The only polymorphic function.)
- BinaryLogicWrapper(operator.xor),
- BinaryLogicWrapper(operator.and_),
- BinaryLogicWrapper(operator.or_),
+ BinaryLogicWrapper(operator.xor, name='_\\/_'),
+ BinaryLogicWrapper(operator.and_, name='/\\'),
+ BinaryLogicWrapper(operator.or_, name='\\/'),
UnaryLogicWrapper(operator.not_),
##███╗ ███╗ █████╗ ████████╗██╗ ██╗
##████╗ ████║██╔══██╗╚══██╔══╝██║ ██║