#12278: misleading (outdated) docstring in partitions_restricted
----------------------------------------+-----------------------------------
       Reporter:  AlexGhitza            |         Owner:  sage-combinat
           Type:  defect                |        Status:  new          
       Priority:  minor                 |     Milestone:  sage-5.3     
      Component:  combinatorics         |    Resolution:               
       Keywords:  partitions docstring  |   Work issues:               
Report Upstream:  N/A                   |     Reviewers:               
        Authors:                        |     Merged in:               
   Dependencies:                        |      Stopgaps:               
----------------------------------------+-----------------------------------
Description changed by andrew.mathas:

Old description:

> The docstring for {{{partitions_restricted}}} says that the function is
> deprecated and one should instead use {{{RestrictedPartitions}}}.
> However, this also turns out to be deprecated.  It would be good to fix
> this.
>
> And here is a more serious problem: the way that is now recommended for
> obtaining the list of restricted partitions is {{{Partitions(n,
> parts_in=S)}}}.  However, {{{Partitions}}} cannot have both
> {{{parts_in}}} and {{{length}}} specified, so not all the functionality
> of the old {{{partitions_restricted}}} remains available.

New description:

 The docstring for {{{partitions_restricted}}} says that the function is
 deprecated and one should instead use {{{RestrictedPartitions}}}.
 However, this also turns out to be deprecated.  It would be good to fix
 this.

 And here is a more serious problem: the way that is now recommended for
 obtaining the list of restricted partitions is {{{Partitions(n,
 parts_in=S)}}}.  However, {{{Partitions}}} cannot have both {{{parts_in}}}
 and {{{length}}} specified, so not all the functionality of the old
 {{{partitions_restricted}}} remains available.

 '''Update:''' Following this
 [https://groups.google.com/forum/?fromgroups=#!topic/sage-combinat-
 devel/utAsQzZQKLo discussion] on sage-combinat, it has been agreed that
 the functionality of RestrictedPartitions should be fully implemented in
 Partitions
 by allowing the combination of different keyword argument. The problem
 with the current implementation is already highlighted in the
 documentation for Partitions():
 {{{
 Right now, the "parts_in", "starting", and "ending" keyword
 arguments are mutually exclusive, both of each other and of other
 keyword arguments. If you specify, say, "parts_in", all other
 keyword arguments will be ignored; "starting" and "ending" work the
 same way.
 }}}
 The code should allow keywords to Partitions() to be used in any way that
 makes sense. In particular, it is not currently possible to combine the
 arguments `parts_in` and `max_length`, for example. For this reason
 RestrictedPartition() has not been deprecated yet. Note, however, that
 `RestrictedPartitions` is essentially a wrapper to gap function call,
 which makes it quite slow. In contrast, the use of `parts_in` is quite
 quick.

--

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