Skip to content

Let categories override the default implementation of __getitem__ in Parent #12956

@nthiery

Description

@nthiery

Parent.getitem should be moved to FiniteEnumeratedSets (#12955). Alas, this is not yet possible since too many finite enumerated sets in Sage are not in the FiniteEnumeratedSets category (see #12957). In the meantime, this patch provides a workaround by asking Parent.getitem to first try to call __getitem__ on its super classes.

CC: @sagetrac-sage-combinat

Component: categories

Keywords: getitem

Author: Nicolas M. Thiéry

Reviewer: Franco Saliola

Merged: sage-5.1.beta1

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions