#13814: LazyFamily.__eq__ gives false positives.
------------------------------------+---------------------------------------
Reporter: cnassau | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.6
Component: combinatorics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Christian Nassau | Merged in:
Dependencies: | Stopgaps:
------------------------------------+---------------------------------------
Comment (by nthiery):
Replying to [comment:7 cnassau]:
> I think this is also how my patch implements this (which does not quite
follow the description in my original submission).
>
> In my patch function equality is tested like this:
>
> * finite family: brute force check of all values
> * infinite family: check if function objects are identical
There is a slight difference: I prefer the distinction to be based on
the class, namely whether we are manipulating two FiniteFamily's or
not.
By the way, please use:
{{{
for i in self.set:
}}}
rather than:
{{{
lst = list(self.set)
for i in lst
}}}
> It occured to me that we should also try this:
>
> * comparison of the pickle-string of the function objects
This sounds reasonable, but needs to be heavily tested for all sorts
of function objects.
> * testing an initial finite slice of the values
I can see the point! Still, I'd rather stick to a behavior that
depends only on the class, rather than on some magic constant.
Otherwise, this is likely to cause bugs that won't be caught by
testing since they will only show up for large objects.
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13814#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.