#17138: LatticePoset: complements() is broken
-------------------------------------+-------------------------------------
Reporter: jmantysalo | Owner:
Type: defect | Status: positive_review
Priority: major | Milestone: sage-6.4
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Jori Mäntysalo | Reviewers: Nathann Cohen
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/latticeposet__complements___is_broken|
cf4f72988a9910e9e64bbef4653524b59af5c67b
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jmantysalo):
* status: needs_review => positive_review
Comment:
Replying to [comment:18 ncohen]:
> 1) The order in which elements are listed when you iterate upon the
elements of a dictionary is architecture-dependent. If you write a doctest
that just 'displays' the content of a dictionary, it will break on some
machines. The problem is not only the order of the lists of complements.
What??? Is `sorted('a', 42)` architecture-dependent? I understand that
`print {'a':'b', 42:43}` is, but that is different thing.
> 2) Actually, there is in Sage a 'hack' that reorders the entry of a
dictionary before they are displayed.
OK, I understand the basic idea behind it. Maybe Volker will tell the
actual code doing this.
> 3) I believe that "random order" should be just "random"
Documentation says if comment ''contains'' strgin "random", then it will
not be tested. So one could write for example "Slightly random due
numerical approximations". But not an important thing.
> I added a commit which does some non-architecture-dependent checks on
the output of the function. Tell me what you think, and you can set the
ticket to `positive_review` if you agree with it !
Works. Thanks.
(Actually I think posets might have real test suite. Maybe later...)
--
Ticket URL: <http://trac.sagemath.org/ticket/17138#comment:19>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.