MCPcopy Create free account
hub / github.com/numpy/numpy / MyClass2

Class MyClass2

numpy/ma/tests/test_core.py:2534–2546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2532
2533 # and that __array_priority__ is respected
2534 class MyClass2:
2535 __array_priority__ = 100
2536
2537 def __mul__(self, other):
2538 return "Me2mul"
2539
2540 def __rmul__(self, other):
2541 return "Me2rmul"
2542
2543 def __rdiv__(self, other):
2544 return "Me2rdiv"
2545
2546 __rtruediv__ = __rdiv__
2547
2548 me_too = MyClass2()
2549 assert_(a.__mul__(me_too) is NotImplemented)

Callers 1

Calls

no outgoing calls

Tested by 1