Skip to content

sage.rings.abc #32566

@mkoeppe

Description

@mkoeppe

This new module will provide abstract base classes for the purpose of isinstance and issubclass testing. This helps with modularization (#32432).

In this ticket, we add RealField, RealDoubleField, ComplexField, ComplexDoubleField, which are in 1:1 correspondence to the implementation classes RealField_class, RealDoubleField_class, ComplexField_class, ComplexDoubleField_class.

To illustrate the use of these classes, we convert some uses of is_... functions to isinstance with the new base classes.

Related:

Part of meta-ticket #32414.

CC: @tscrim @kliem @videlec @nbruin

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 6e2c3c4

Reviewer: Jonathan Kliem

Issue created by migration from https://trac.sagemath.org/ticket/32566

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions