> I guess "safe" is a matter of personal taste. I find > > sage: GF(5)(0) == 0 > True > sage: GF(5)(1) == 1 > True > sage: GF(5)(-1) == -1 > True > > to be "safe," but it seems some people are really bothered by this > idea and would rather have to write "a == a.parent().coerce(1)" I'd rather write a.parent().one or a.parent().one() or a.parent().unit() or... rather than to ask for coercion. IE if you are in a ring you are supposed to have unit which can be a complicated data structure (eg 1000x1000 sparse matrix or something even worse). If it's the case, the methods which compute it should have a cache if it's not an attribute whereas coerce clearly can't have reasonable cache for large base ring. I don't think having coerce do a particular thing for 0, 1 or -1 is reasonable... Cheers, Florent --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
- [sage-devel] Re: element of integermod is element of integ... Bill Page
- [sage-devel] Re: element of integermod is element of integ... David Roe
- [sage-devel] Re: element of integermod is element of integ... Bill Page
- [sage-devel] Re: element of integermod is element of integ... Robert Bradshaw
- [sage-devel] Re: element of integermod is element of integ... Carl Witty
- [sage-devel] Re: element of integermod is element of integ... Robert Bradshaw
- [sage-devel] Re: element of integermod is element of integ... Bill Page
- [sage-devel] Re: element of integermod is element of integ... Carl Witty
- [sage-devel] Re: element of integermod is element of integ... Florent Hivert
- [sage-devel] Re: element of integermod is element of integ... Robert Bradshaw
- [sage-devel] Re: element of integermod is element of integ... Florent Hivert
- [sage-devel] Re: element of integermod is element of integ... Robert Bradshaw
- [sage-devel] Re: element of integermod is element of integ... Bill Page
- [sage-devel] Is Sage implementing mathematics? Ralf Hemmecke
- [sage-devel] Re: Is Sage implementing mathematics? John Cremona
- [sage-devel] Re: Is Sage implementing mathematics? Ralf Hemmecke
- [sage-devel] Re: Is Sage implementing mathematics? Robert Bradshaw
- [sage-devel] Re: Is Sage implementing mathematics? Ralf Hemmecke
- [sage-devel] Re: Is Sage implementing mathematics? William Stein
- [sage-devel] Re: Is Sage implementing mathematics? Craig Citro
- [sage-devel] Re: Is Sage implementing mathematics? Bill Page