On Fri, Feb 5, 2010 at 6:44 AM, John Cremona <john.crem...@gmail.com> wrote: > First example, nothing unexpected. Note that P is created with a > tuple and Q with a list. > > sage: P2 = ProjectiveSpace(GF(2),2) > sage: P = P2.point((0,0,1)) > sage: Q = P2.point([0,0,1]) > sage: P > (0 : 0 : 1) > sage: Q > (0 : 0 : 1) > sage: P==Q > True > sage: P._coords > [0, 0, 1] > sage: Q._coords > [0, 0, 1] > > > Now the same but with "check=False": > > sage: P = P2.point((0,0,1),check=False) > sage: Q = P2.point([0,0,1],check=False) > sage: P > (0 : 0 : 1) > sage: Q > (0 : 0 : 1) > sage: P==Q > False > sage: P._coords > (0, 0, 1) > sage: Q._coords > [0, 0, 1] > > The point is that on creation of the point, valid tuple input is > converted to a list, unless check=False in which case tuples are left > as tuples. This can result in wrong results. > > I know that users should only use "check=False" if they know what they > are doing! This caught me out while writing a patch for #8193 (which > I used to show a new student the ropes, but testing it led us to this > weirdness!). I suggest that the point-creation function takes the > trouble to always store _coords in a consistent way, presumably as a > list as at present (thought surely a tuple would be better?)
I don't understand. The entire point of check=False is to not check, and you're suggesting that check=False does check. I'm confused despite your length explanation. If you call a function with check=False and give invalid input, you shouldn't expect anything to work after that. Maybe you want another option that isn't "check=False"? > > John > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org