Opened 10 years ago

Closed 10 years ago

#12956 closed defect (fixed)

Let categories override the default implementation of __getitem__ in Parent

Reported by: nthiery Owned by: nthiery
Priority: major Milestone: sage-5.1
Component: categories Keywords: getitem
Cc: sage-combinat 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 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.

Attachments (1)

trac_12956-parent_categories_getitem-nt.patch (2.1 KB) - added by nthiery 10 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by nthiery

  • Description modified (diff)

comment:2 Changed 10 years ago by nthiery

  • Keywords getitem added
  • Reviewers set to Franco Saliola
  • Status changed from new to needs_review

comment:3 Changed 10 years ago by nthiery

  • Status changed from needs_review to positive_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 10 years ago by jdemeyer

  • Merged in set to sage-5.1.beta1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.