#17051: Strange bug in poset show()
---------------------------------+------------------------
Reporter: jmantysalo | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
---------------------------------+------------------------
Comment (by ncohen):
I HATE THIS CODE. You cannot for one second even trust that it does what
you think it should do.
Okay, that's because there is in Poset(....) a keyword named "facade" (not
how clearly it indicates what it does) that changes the type of the things
inside of the poset.
{{{
sage: d = DiGraph({0:[1]})
sage: map(type,Poset(d))
[sage.rings.integer.Integer, sage.rings.integer.Integer]
sage: map(type,Poset(d,facade=False))
[sage.combinat.posets.elements.FinitePoset_with_category.element_class,
sage.combinat.posets.elements.FinitePoset_with_category.element_class]
}}}
I had to fight a looooong time ago to obtain that facade becomes True by
defaut in Posets. And now it is, but for some stupid reason the
constructor of PentagonalPoset enforces facade=False. So the code should
only be changed to follow the same default as the Poset constructor. Or
even to remove this keyword in PentagonalPoset, or replace it with
`**kwds`... Anything `-_-`
By the way: the real explanation is that the + has been changed to mean
"join" or "meet". It is not had to find out: take your 'x' as you defined
it and type 'x.__add__'.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/17051#comment:7>
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.