示例#1
0
 def __radd__(self, u):
     raise InvalidUnitOperation("addition with unit objects is not allowed")
示例#2
0
 def __rsub__(self, u):
     raise InvalidUnitOperation(
         "subtraction with unit objects is not allowed")
示例#3
0
 def __itruediv__(self, u):
     raise InvalidUnitOperation(
         "in-place operations with unit objects are not allowed"
     )