#13747: Change default behaviour of Poset to facade = True
----------------------------------+-----------------------------------------
       Reporter:  ncohen          |         Owner:  sage-combinat  
           Type:  defect          |        Status:  positive_review
       Priority:  major           |     Milestone:  sage-5.6       
      Component:  combinatorics   |    Resolution:                 
       Keywords:                  |   Work issues:                 
Report Upstream:  N/A             |     Reviewers:  Christian Kuper
        Authors:  Nathann Cohen   |     Merged in:                 
   Dependencies:  #11763, #12930  |      Stopgaps:                 
----------------------------------+-----------------------------------------
Description changed by ncohen:

Old description:

> As mentionned in the following discussions :
> * http://groups.google.com/forum/#!msg/sage-devel/qQzzZEh-
> JRo/WxU_qyxH2igJ
> * http://groups.google.com/d/topic/sage-combinat-
> devel/bfWbG54sedM/discussion (sage-combinat fork of the discussion)
> * https://groups.google.com/d/topic/sage-devel/xQxQLkm-RUU/discussion
>
> This patch changes the default behaviour of the Poset constructor to
> facade = True, so that the elements that you define the Poset with are
> the elements it contains.
>
> Two comments about this ticket :
> * While the documentation of the poset/ files say that `facade` is a
> boolean, it is not. Its former default value is actually `None`, and the
> code itself tests several times `if facade is None`. No idea why. All I
> know is that I first tried to make it really boolean, and to replace
> those `None` tests by `if not facade`, but I was not able to make all
> tests pass without any idea why. I added a warning about this in the
> file's header, and the doctests based on the former versions of Posets
> are now defined with a `facade = None` flag. Even though it should be a
> boolean. Well, if this wasn't a problem before, no reason why it should
> become one now. This clearly has to be fixed too.
> * There is a `Poset.linear_extensions` method whose default behaviour is
> also `facade = None`. Despite taking an optional flag, this method *DOES
> NOT WORK* as it is clearly indicated in its docstring. One can easily
> wonder what the hell this function is doing in Sage's code. Hence this
> function's behaviour is left untouched. It will use `facade=None` by
> default until it is rewritten correctly, or removed.
>
> Nathann
>
> Apply:
> * [attachment:trac_13747.patch]
> * [attachment:trac_13747-doctests.patch]
> * [attachment:trac_13747_reviewer.patch]
> * [attachment:trac_13747-rebase-11763.patch]

New description:

 As mentionned in the following discussions :
 * http://groups.google.com/forum/#!msg/sage-devel/qQzzZEh-JRo/WxU_qyxH2igJ
 * http://groups.google.com/d/topic/sage-combinat-
 devel/bfWbG54sedM/discussion (sage-combinat fork of the discussion)
 * https://groups.google.com/d/topic/sage-devel/xQxQLkm-RUU/discussion

 This patch changes the default behaviour of the Poset constructor to
 facade = True, so that the elements that you define the Poset with are the
 elements it contains.

 Two comments about this ticket :
 * While the documentation of the poset/ files say that `facade` is a
 boolean, it is not. Its former default value is actually `None`, and the
 code itself tests several times `if facade is None`. No idea why. All I
 know is that I first tried to make it really boolean, and to replace those
 `None` tests by `if not facade`, but I was not able to make all tests pass
 without any idea why. I added a warning about this in the file's header,
 and the doctests based on the former versions of Posets are now defined
 with a `facade = None` flag. Even though it should be a boolean. Well, if
 this wasn't a problem before, no reason why it should become one now. This
 clearly has to be fixed too.
 * There is a `Poset.linear_extensions` method whose default behaviour is
 also `facade = None`. Despite taking an optional flag, this method *DOES
 NOT WORK* as it is clearly indicated in its docstring. One can easily
 wonder what the hell this function is doing in Sage's code. Hence this
 function's behaviour is left untouched. It will use `facade=None` by
 default until it is rewritten correctly, or removed.

 Nathann

 Apply:
 * [attachment:trac_13747.patch]
 * [attachment:trac_13747-doctests.patch]
 * [attachment:trac_13747_reviewer.patch]
 * [attachment:trac_13747-rebase-11763.patch]
 * [attachment:trac_13747-rebase-12930.patch]

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13747#comment:34>
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.

Reply via email to