Python operator.__floordiv__() Examples
The following are 3
code examples of operator.__floordiv__().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
operator
, or try the search function
.
Example #1
Source File: lineroot.py From backtrader with GNU General Public License v3.0 | 5 votes |
def __floordiv__(self, other): return self._operation(other, operator.__floordiv__)
Example #2
Source File: lineroot.py From backtrader with GNU General Public License v3.0 | 5 votes |
def __rfloordiv__(self, other): return self._roperation(other, operator.__floordiv__)
Example #3
Source File: Pbinop.py From supriya with MIT License | 5 votes |
def _string_to_operator(self): operators = { "+": operator.__add__, "-": operator.__sub__, "*": operator.__mul__, "**": operator.__pow__, "/": operator.__truediv__, "//": operator.__floordiv__, } return operators[self.operator] ### PUBLIC PROPERTIES ###