SHARE
TWEET

python @ syntax for __matmul__ method

a guest Jun 10th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. In [15]: class A:
  2.     ...:     def __matmul__(self,b):
  3.     ...:         print(self, b)
  4.     ...:                                            
  5.  
  6. In [16]: a = A()                                    
  7.  
  8. In [17]: a @ a                                      
  9. <__main__.A object at 0x7f6bd0e44780> <__main__.A object at 0x7f6bd0e44780>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top