On Tuesday, October 28, 2014 5:16:47 PM UTC, Erik Massop wrote: > > class CoercingDict: > def __init__(self, f): > self.f = f > self.data = dict() > def __setitem__(self, key, value): > self.data[self.f(key)] = value
Thats manual conversion, not coercion. This is: sage: s = Sequence([int(1), ZZ(2), QQ(3)]) sage: s.universe() Rational Field sage: map(type, s) [<type 'sage.rings.rational.Rational'>, <type 'sage.rings.rational.Rational'>, <type 'sage.rings.rational.Rational'>] -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.