Skip to content

Commit 9f95313

Browse files
committed
moving the _pseudo_fraction_field method to categories
1 parent 4cdd703 commit 9f95313

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

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)