Opened 11 years ago

Closed 11 years ago

#12956 closed defect (fixed)

Let categories override the default implementation of __getitem__ in Parent

Reported by: Nicolas M. Thiéry Owned by: Nicolas M. Thiéry
Priority: major Milestone: sage-5.1
Component: categories Keywords: getitem
Cc: Sage Combinat CC user Merged in: sage-5.1.beta1
Authors: Nicolas M. Thiéry Reviewers: Franco Saliola
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Nicolas M. Thiéry)

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.

Attachments (1)

trac_12956-parent_categories_getitem-nt.patch (2.1 KB) - added by Nicolas M. Thiéry 11 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by Nicolas M. Thiéry

Description: modified (diff)

Changed 11 years ago by Nicolas M. Thiéry

comment:2 Changed 11 years ago by Nicolas M. Thiéry

Keywords: getitem added
Reviewers: Franco Saliola
Status: newneeds_review

comment:3 Changed 11 years ago by Nicolas M. Thiéry

Status: needs_reviewpositive_review

All tests pass on 5.0 + above patches with positive review in the Sage-Combinat queue.

Positive review on behalf of Franco sitting next to me.

comment:4 Changed 11 years ago by Jeroen Demeyer

Merged in: sage-5.1.beta1
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.