#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 cnassau):
Ok, so I'll prepare a new patch which
* does not compare function values if the indexing set is finite
* recognizes identical function objects
* uses `self.function.__eq__` if this is available
* otherwise treats functions as distinct
We will then have, for example,
{{{
sage: LazyFamily([1,2,3], lambda i:i) == LazyFamily([1,2,3], lambda
i:i)
False
sage: LazyFamily([1,2,3], lambda i:i) != LazyFamily([1,2,3], lambda
i:i)
False
}}}
I predict that quite a number of doctests will have to be modified. There
will be new pickling failures, because Sage will often not be able to
verify `f == load(dumps(f))`. If we switched to `not(f!=load(dumps(f)))`
the doctests could probably remain as they are. I'll post more on this
when I have the patch and some numbers.
Cheers,
Christian
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13814#comment:12>
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.