I think they should still exist, but should be cdef'd. This means I can interface between C longs and sage Integers without having to reach in and grab n.value, but one can't use them to make Integers mutable in Python. A function get_si() would also be useful if it did bounds checking so that I don't have to worry about the mpz_t not fitting in a long. David
On Mon, Mar 3, 2008 at 8:02 AM, Joel B. Mohler <[EMAIL PROTECTED]> wrote: > > Hi, > > These methods set_si & set_str violate immutability: > sage: n=300 > sage: n.set_si(12) > sage: n > 12 > > Shouldn't they be called _set_unsafe_xx? Better yet, shouldn't they be > deleted altogether since I can't find anywhere they are used in code aside > from doc-tests? Or, was that the point -- to doc-test something? > > The Rational object also has these methods. > > -- > Joel > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---