mirror of
https://github.com/python/cpython.git
synced 2025-09-22 00:12:56 +00:00
bpo-36669: add matmul support to weakref.proxy (GH-12932)
This commit is contained in:
parent
3cde440f20
commit
7abb6c05af
5 changed files with 31 additions and 0 deletions
|
@ -525,6 +525,8 @@ WRAP_BINARY(proxy_iand, PyNumber_InPlaceAnd)
|
|||
WRAP_BINARY(proxy_ixor, PyNumber_InPlaceXor)
|
||||
WRAP_BINARY(proxy_ior, PyNumber_InPlaceOr)
|
||||
WRAP_UNARY(proxy_index, PyNumber_Index)
|
||||
WRAP_BINARY(proxy_matmul, PyNumber_MatrixMultiply)
|
||||
WRAP_BINARY(proxy_imatmul, PyNumber_InPlaceMatrixMultiply)
|
||||
|
||||
static int
|
||||
proxy_bool(PyWeakReference *proxy)
|
||||
|
@ -642,6 +644,8 @@ static PyNumberMethods proxy_as_number = {
|
|||
proxy_ifloor_div, /*nb_inplace_floor_divide*/
|
||||
proxy_itrue_div, /*nb_inplace_true_divide*/
|
||||
proxy_index, /*nb_index*/
|
||||
proxy_matmul, /*nb_matrix_multiply*/
|
||||
proxy_imatmul, /*nb_inplace_matrix_multiply*/
|
||||
};
|
||||
|
||||
static PySequenceMethods proxy_as_sequence = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue