Reputation: 2157
How can I add an integer division //
method to a class?
I can add a subtraction method like def __sub__(self, other):
, so how can I do it with //
?
I looked for this online, and couldn't find anything.
Using Python 3.
Upvotes: 2
Views: 744