Skip to content

Commit c4ea85e

Browse files
Release Managervbraun
Release Manager
authored andcommitted
Trac #26934: Remove pointless comparison doctests in valuations
These doctests specifically try to compare uncomparable valuations, which is going to be an error after #22029. URL: https://trac.sagemath.org/26934 Reported by: jdemeyer Ticket author(s): Jeroen Demeyer Reviewer(s): Julian Rüth
2 parents 9ffe0c7 + d7ece06 commit c4ea85e

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

src/sage/rings/valuation/valuation.py

-39
Original file line numberDiff line numberDiff line change
@@ -179,19 +179,6 @@ def _richcmp_(self, other, op):
179179
False
180180
sage: v != w
181181
True
182-
183-
Note that this does not affect comparison of valuations which do not
184-
coerce into a common parent. This is by design in Sage, see
185-
:meth:`sage.structure.element.Element.__richcmp__`. When the valuations
186-
do not coerce into a common parent, a rather random comparison of
187-
``id`` happens::
188-
189-
sage: w = valuations.TrivialValuation(GF(2))
190-
sage: w <= v # random output
191-
True
192-
sage: v <= w # random output
193-
False
194-
195182
"""
196183
if op == op_LT:
197184
return self <= other and not (self >= other)
@@ -245,19 +232,6 @@ def _le_(self, other):
245232
sage: w = QQ.valuation(2)
246233
sage: v <= w
247234
True
248-
249-
Note that this does not affect comparison of valuations which do not
250-
coerce into a common parent. This is by design in Sage, see
251-
:meth:`sage.structure.element.Element.__richcmp__`. When the valuations
252-
do not coerce into a common parent, a rather random comparison of
253-
``id`` happens::
254-
255-
sage: w = valuations.TrivialValuation(GF(2))
256-
sage: w <= v # random output
257-
True
258-
sage: v <= w # random output
259-
False
260-
261235
"""
262236
return other >= self
263237

@@ -275,19 +249,6 @@ def _ge_(self, other):
275249
sage: w = QQ.valuation(2)
276250
sage: v >= w
277251
False
278-
279-
Note that this does not affect comparison of valuations which do not
280-
coerce into a common parent. This is by design in Sage, see
281-
:meth:`sage.structure.element.Element.__richcmp__`. When the valuations
282-
do not coerce into a common parent, a rather random comparison of
283-
``id`` happens::
284-
285-
sage: w = valuations.TrivialValuation(GF(2))
286-
sage: w <= v # random output
287-
True
288-
sage: v <= w # random output
289-
False
290-
291252
"""
292253
if self == other: return True
293254
from .scaled_valuation import ScaledValuation_generic

0 commit comments

Comments
 (0)