2009/4/3 Robert Bradshaw <rober...@math.washington.edu>: > > On Apr 3, 2009, at 12:13 PM, Nick Alexander wrote: > >> >>> This should probably change, and >>> ZZ._coerce_map_from_(bool) should return True. >> >> Just to be clear: we are going to keep "True * 1" as a valid >> multiplication? That seems bizarre to me. > > Well, I'm not stuck on it, it'd be mostly to follow Python here > > >>> 1 * True > 1 > >>> 2 * True > 2 > >>> 1.25 + True > 2.25 > > It does feel a bit odd... > > - Robert
Odd or not, it is a fact that in Sage if n is a Python int/float then the above works as given (and this is the case even in Python 3.0). I think we should just follow Python for consistency here. William --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---