Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Improve ABC example
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Nov 23, 2021
1 parent 7d6a44c commit f83d424
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/doc/en/developer/packaging_sage_library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,17 @@ distribution -- which then must be declared as a run-time dependency.
provides abstract base classes for many ring (parent) classes,
including :class:`sage.rings.abc.pAdicField`. So we can replace::

isinstance(object, sage.rings.padics.generic_nodes.pAdicField)
from sage.rings.padics.generic_nodes import pAdicField # heavy dependencies
isinstance(object, pAdicField)

and::

sage.rings.padics.generic_nodes.is_pAdicField(object)
from sage.rings.padics.generic_nodes import pAdicField # heavy dependencies
is_pAdicField(object) # deprecated

by::

import sage.rings.abc # no dependencies
isinstance(object, sage.rings.abc.pAdicField)


Expand Down

0 comments on commit f83d424

Please sign in to comment.