Opened 4 years ago

Closed 4 years ago

#23844 closed defect (fixed)

GapElement.__contains__ (from libgap) should use the infix `in` from gap

Reported by: vdelecroix Owned by:
Priority: major Milestone: sage-8.1
Component: interfaces Keywords: thursdaysbdx
Cc: Merged in:
Authors: Vincent Delecroix Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: f8c0088 (Commits, GitHub, GitLab) Commit: f8c0088fbb70a1ac2211791bfcd6f3b5aeeb71d5
Dependencies: Stopgaps:

Status badges

Description (last modified by tscrim)

Right now __contains__ is not defined and defaults to the Python behavior, which does some very wrong stuff when both sides are GapElement. The following gets right with the branch applied

sage: 1 in libgap(ZZ)
Traceback (most recent call last):
TypeError: argument of type '' is not iterable

Change History (5)

comment:1 Changed 4 years ago by vdelecroix

  • Keywords thursdaysbdx added

comment:2 Changed 4 years ago by vdelecroix

  • Authors set to Vincent Delecroix
  • Branch set to u/vdelecroix/23844
  • Commit set to f8c0088fbb70a1ac2211791bfcd6f3b5aeeb71d5
  • Status changed from new to needs_review

New commits:

f8c008823844: infix 'in' for GapElement

comment:3 Changed 4 years ago by vdelecroix

  • Description modified (diff)

comment:4 Changed 4 years ago by tscrim

  • Description modified (diff)
  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM (although Element does not define a __contains__, so I updated the description).

comment:5 Changed 4 years ago by vbraun

  • Branch changed from u/vdelecroix/23844 to f8c0088fbb70a1ac2211791bfcd6f3b5aeeb71d5
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.