Allow for Integer(3, parent = MyParent)
|Reported by:||nthiery||Owned by:||nthiery|
|Component:||basic arithmetic||Keywords:||Integer, IntegerWrapper|
|Cc:||sage-combinat, mhansen, robertwb||Merged in:||sage-4.2.alpha1|
|Authors:||Nicolas M. Thiéry||Reviewers:||Mike Hansen|
|Report Upstream:||Work issues:|
The attached patch allows for the creation of integers whose parents are not IntegerRing?():
sage: n = Integer(3, parent = Primes()) sage: n 3 sage: n.parent() Set of all prime numbers: 2, 3, 5, 7, ...
That's used in a couple places in the category code #5891, when illustrating how to create new parents like the set of prime integers. So this is quite urgent.
Any better implementation welcome! I am fine also with having this work only for IntegerWrapper?.
Change History (12)
comment:3 in reply to: ↑ 2 Changed 8 years ago by
- Cc changed from sage-combinat,mhansen to sage-combinat, mhansen
Changed 8 years ago by
comment:9 in reply to: ↑ 8 Changed 8 years ago by
- Cc robertwb added
- Status changed from new to needs_review
comment:10 Changed 8 years ago by
- Merged in set to sage-4.2.alpha1
- Reviewers set to Mike Hansen
- Status changed from needs_review to positive_review