Skip to content

Commit 1f90bce

Browse files
committed
remove __rtruediv__ definitions which fail to compile with Cython 3
They fail to compile with Cython 3 and c_api_binop_methods=True, and are never treated as special arithmetic methods by old Cython anyway, so they can be safely removed.
1 parent 878c1f7 commit 1f90bce

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

src/sage/rings/complex_mpc.pyx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,26 +1571,6 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
15711571
mpc_norm(x.value, self.value, (<RealField_class>x._parent).rnd)
15721572
return x
15731573

1574-
def __rtruediv__(self, left):
1575-
r"""
1576-
Returns the quotient of ``left`` with ``self``, that is: ``left/self``
1577-
as a complex number.
1578-
1579-
INPUT:
1580-
1581-
- ``left`` -- a complex number
1582-
1583-
EXAMPLES::
1584-
1585-
sage: MPC = MPComplexField()
1586-
sage: a = MPC(2, 2)
1587-
sage: a.__rtruediv__(MPC(1))
1588-
0.250000000000000 - 0.250000000000000*I
1589-
sage: MPC(1)/a
1590-
0.250000000000000 - 0.250000000000000*I
1591-
"""
1592-
return MPComplexNumber(self._parent, left)/self
1593-
15941574
def __pow__(self, right, modulus):
15951575
"""
15961576
Compute ``self`` raised to the power of exponent, rounded in

src/sage/rings/complex_mpfr.pyx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,28 +1658,6 @@ cdef class ComplexNumber(sage.structure.element.FieldElement):
16581658
mpfr_clear(right_nm)
16591659
return x
16601660

1661-
def __rtruediv__(self, left):
1662-
r"""
1663-
Return the quotient of left with ``self``, that is:
1664-
1665-
``left/self``
1666-
1667-
as a complex number.
1668-
1669-
INPUT:
1670-
1671-
- ``left`` -- a complex number to divide by ``self``
1672-
1673-
EXAMPLES::
1674-
1675-
sage: a = ComplexNumber(2,0)
1676-
sage: a.__rtruediv__(CC(1))
1677-
0.500000000000000
1678-
sage: CC(1)/a
1679-
0.500000000000000
1680-
"""
1681-
return ComplexNumber(self._parent, left)/self
1682-
16831661
def __pow__(self, right, modulus):
16841662
r"""
16851663
Raise ``self`` to the ``right`` exponent.

0 commit comments

Comments
 (0)