Commit Graph

5 Commits

Author SHA1 Message Date
William S Fulton cf8788c411 Update Python tests to not use flatstaticmethod access
Use Python class staticmethod syntax to access C++ static member functions,
such as Klass.memberfunction, instead of Klass_memberfunction.
Examples and test-suite changes in preparation for issue #2137.
2022-01-14 22:48:11 +00:00
William S Fulton c6547ac44e Fix functors (wrapped as __call__) when using -builtin -modern -fastunpack. 2018-09-19 20:10:11 +01:00
William S Fulton a09ef99606 Python operator_overload runtime testcase cleanup
Remove C test code comment ... this code is in operator_overload.i already
2016-05-05 20:28:22 +01:00
Emmanuel Julien cf370fb504 Fix class member division operator.
Define the nb_divide/nb_inplace_divide slots in the interface and use it them as nb_divide/nb_inplace_divide for Python 2.x and as nb_true_divide/nb_inplace_trus_divide for Python 3.x.

The Python 3.x nb_floor_divide/nb_inplace_floor_divide slots (operator // in Python) are not populated by the interface.
2016-02-22 14:54:19 +01:00
Emmanuel Julien 779ed2cd7a Implement the operator overload test suite for Python.
This suite fails on Python 3 (with and without -builtin) due to the following issues:

- Operator / is mapped to the div slot which is now truediv in Python3 (see PR #136 for a WIP fix).
- Operators +=, -=, *= and probably others assign the method return type (void) to the object they are applied on. A workaround is to return *this from the affected operators.
2016-02-19 00:18:39 +01:00