Skip to content

Commit 02dee9f

Browse files
author
Release Manager
committed
gh-40748: moving the _pseudo_fraction_field method to categories after #39713, it is no longer needed to have this method in ring.pyx ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. URL: #40748 Reported by: Frédéric Chapoton Reviewer(s): David Coudert
2 parents d542c6a + 9f77458 commit 02dee9f

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

src/doc/en/thematic_tutorials/coercion_and_categories.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ as this base class still provides a few more methods than a general parent::
118118
'_latex_names',
119119
'_list',
120120
'_one_element',
121-
'_pseudo_fraction_field',
122121
'_zero_element',
123122
'base_extend',
124123
'extension',

src/sage/rings/ring.pyx

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -539,34 +539,6 @@ cdef class CommutativeRing(Ring):
539539
self.__fraction_field = K
540540
return self.__fraction_field
541541

542-
def _pseudo_fraction_field(self):
543-
r"""
544-
This method is used by the coercion model to determine if `a / b`
545-
should be treated as `a * (1/b)`, for example when dividing an element
546-
of `\ZZ[x]` by an element of `\ZZ`.
547-
548-
The default is to return the same value as ``self.fraction_field()``,
549-
but it may return some other domain in which division is usually
550-
defined (for example, ``\ZZ/n\ZZ`` for possibly composite `n`).
551-
552-
EXAMPLES::
553-
554-
sage: ZZ._pseudo_fraction_field()
555-
Rational Field
556-
sage: ZZ['x']._pseudo_fraction_field()
557-
Fraction Field of Univariate Polynomial Ring in x over Integer Ring
558-
sage: Integers(15)._pseudo_fraction_field()
559-
Ring of integers modulo 15
560-
sage: Integers(15).fraction_field()
561-
Traceback (most recent call last):
562-
...
563-
TypeError: self must be an integral domain.
564-
"""
565-
try:
566-
return self.fraction_field()
567-
except (NotImplementedError,TypeError):
568-
return coercion_model.division_parent(self)
569-
570542
def extension(self, poly, name=None, names=None, **kwds):
571543
"""
572544
Algebraically extend ``self`` by taking the quotient

0 commit comments

Comments
 (0)