Skip to content

Replace __call__() by _element_constructor_() in MatrixSpace #31078

@pjbruin

Description

@pjbruin

The MatrixSpace class still has a __call__() method instead of _element_constructor_(). This is relatively easy to change, and has the benefit that if M is a matrix space and m an element of M, then M(m) simply returns m. This can be viewed as a small addendum to #23719.

One side effect of the attached branch is that the first argument (entries) is now effectively a mandatory non-keyword argument, and copy and coerce are keyword-only arguments. This is probably a good thing for readability, though.

Depends on #31072

Component: coercion

Author: Peter Bruin

Branch/Commit: c9f048b

Reviewer: David Roe

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions