#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:12 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
Excellent. Thanks!
> 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 really vote for == and != being consistent. Comments anyone else?
> 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))`.
Do you mind post here a quick selection of typical
doctests / pickling failures? That will be a good source for me and
others to think about what the right approach shall be.
Thanks for your ongoing work!
Nicolas
PS: for the other ticket, since the changes are fairly independent,
please keep them separate!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13814#comment:15>
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.