🧮 operators module¶
Overloaded and new python operators.
- class pupyl.addendum.operators.Infix(method)¶
Definitions for infix operators.
- __init__(method)¶
Defining infix operators, which is a way to overload (or create) new operators.
- Parameters:
method (
callable
) – A function that will work as a new operator.
Notes
More about infix operators: https://www.geeksforgeeks.org/prefix-infix-conversion/
- __rlshift__(other)¶
Supporting reversed right hand bitshift operations, in this case the leftmost operator.
- Parameters:
other (
callable
) – The counterpart of operation.
Example
1 << 2
- __rshift__(other)¶
Supporting reversed right hand bitshift operations, in this case the rightmost operator.
- Parameters:
other (
callable
) – The counterpart of operation.
Example
1 >> 2
- __weakref__¶
list of weak references to the object (if defined)