add floor division node
This commit is contained in:
parent
237b848837
commit
d65026f73d
@ -96,4 +96,10 @@ class DivideNode(BinOpNode):
|
|||||||
# try truediv first, followed by div
|
# try truediv first, followed by div
|
||||||
BinOpNode.__init__(self, name, ('__truediv__', '__div__'))
|
BinOpNode.__init__(self, name, ('__truediv__', '__div__'))
|
||||||
|
|
||||||
|
class FloorDivideNode(BinOpNode):
|
||||||
|
"""Returns A // B. Does not check input types."""
|
||||||
|
nodeName = 'FloorDivide'
|
||||||
|
def __init__(self, name):
|
||||||
|
BinOpNode.__init__(self, name, '__floordiv__')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user