On Sep 14, 2008, at 4:53 PM, William Stein wrote:
> On Sun, Sep 14, 2008 at 1:25 PM, Justin Walker <[EMAIL PROTECTED]> wrote:
[snip]
>> [2] I fussed over this while working on my patch, and finally decided
>>    to leave it alone.  Is there any cause to be concerned about
>> caching,
>>    by code using the BQF code?  It might be disconcerting to find
>> things
>>    changing under you.  I may have missed discussion on the lists
>> about
>>    this; apologies if this has been kneaded to a tough consistency.
>>
>
> Make damn sure that the __hash__ method is *not* implemented
> if quadratic forms are mutable.   Otherwise, bad things will happen.
> Otherwise, it's just a design choice.  E.g., mutable matrices are
> certainly useful, but mutable polynomials usually aren't so we
> don't (officially) have them (though there is an _underscore method
> to mutate even a polynomial).
>
> I personally would tend to vote to have a method "reduced" that
> returns the reduced version of the quadratic form.  I usually prefer
> for elements to be immutable whenever possible...

We don't have a __hash__() method for forms at this point, but thanks  
for bringing that up.  I'd have overlooked that, for sure.  Is  
mutability/immutability assumed when needed, or is there a way of  
testing the underlying types?

I prefer immutability as well, but John seems to feel that it's A Good  
Thing to have reduce() 'mute' the form :-}.  I'll defer to him, in  
this case, since the code is already accepted.

Justin

--
Justin C. Walker, Curmudgeon-at-Large
() The ASCII Ribbon Campaign
/\ Help Cure HTML Email




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to