File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1911,7 +1911,6 @@ def collect_dunders(symbols):
1911
1911
'__add__' : '+' ,
1912
1912
'__sub__' : '-' ,
1913
1913
'__mul__' : '*' ,
1914
- '__matmul__' : '@' ,
1915
1914
'__truediv__' : '/' ,
1916
1915
'__floordiv__' : '//' ,
1917
1916
'__mod__' : '%' ,
@@ -1931,6 +1930,12 @@ def collect_dunders(symbols):
1931
1930
if symbol in symbols :
1932
1931
symbols [symbol ] += f' { dunder } '
1933
1932
1933
+ # __matmul__ isn't included above because help('@') doesn't talk about
1934
+ # matrix multiplication, so we shouldn't list it here as a related topic.
1935
+ dunders ['__matmul__' ] = ('numeric-types' , f'__rmatmul__ __imatmul__ SPECIALMETHODS' )
1936
+ dunders ['__rmatmul__' ] = ('numeric-types' , f'__matmul__ SPECIALMETHODS' )
1937
+ dunders ['__imatmul__' ] = ('numeric-types' , f'__matmul__ SPECIALMETHODS' )
1938
+
1934
1939
dunders ['__divmod__' ] = ('numeric-types' , 'divmod' )
1935
1940
1936
1941
return dunders
You can’t perform that action at this time.
0 commit comments