Skip to content

Commit

Permalink
Support proper wrapping of matrix multiplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-hof committed Feb 4, 2017
1 parent 8b5d8a8 commit 077f38a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Acquisition/__init__.py
Expand Up @@ -567,6 +567,7 @@ def __str__(self):
'__add__',
'__sub__',
'__mul__',
'__matmul__',
'__floordiv__', # not implemented in C
'__mod__',
'__divmod__',
Expand Down Expand Up @@ -601,6 +602,7 @@ def __str__(self):
'__iadd__',
'__isub__',
'__imul__',
'__imatmul__',
'__idiv__',
'__itruediv__',
'__ifloordiv__',
Expand Down
6 changes: 6 additions & 0 deletions src/Acquisition/tests.py
Expand Up @@ -3358,6 +3358,12 @@ class TestProxying(unittest.TestCase):
# '__coerce__',
]

if PY3 and sys.version_info.minor >= 5:
__binary_numeric_methods__.extend([
'__matmul__',
'__imatmul__'
])

__unary_special_methods__ = [
# arithmetic
'__neg__',
Expand Down

0 comments on commit 077f38a

Please sign in to comment.