#13431: Add sign as an alias for signature for permutations
---------------------------------+------------------------------------------
       Reporter:  cremona        |         Owner:  tbd            
           Type:  enhancement    |        Status:  positive_review
       Priority:  minor          |     Milestone:  sage-5.4       
      Component:  combinatorics  |    Resolution:                 
       Keywords:  permutation    |   Work issues:                 
Report Upstream:  N/A            |     Reviewers:  Rob Beezer     
        Authors:  Kevin Halasz   |     Merged in:                 
   Dependencies:                 |      Stopgaps:                 
---------------------------------+------------------------------------------
Changes (by {'newvalue': u'Kevin Halasz', 'oldvalue': ''}):

  * status:  needs_work => positive_review
  * reviewer:  => Rob Beezer
  * author:  => Kevin Halasz


Old description:

> As I reported on sage-devel:
> {{{
> sage: pi = permutations(4)[4]
> sage: pi.signature()
> 1
> sage: pi.sign()
> ...
> AttributeError: 'Permutation_class' object has no attribute 'sign'
> }}}
> and as was also mentioned:
> {{{
> sage: G = SymmetricGroup(2)
> sage: a = G("(1,2)")
> sage: a.sign()
> -1
> }}}
>
> The proposal is to add sign as an alias to signature for the class
> 'sage.combinat.permutation.Permutation_class' by adding a single line to
> sage/combinat/permutation.py saying "sign = signature"

New description:

 As I reported on sage-devel:
 {{{
 sage: pi = permutations(4)[4]
 sage: pi.signature()
 1
 sage: pi.sign()
 ...
 AttributeError: 'Permutation_class' object has no attribute 'sign'
 }}}
 and as was also mentioned:
 {{{
 sage: G = SymmetricGroup(2)
 sage: a = G("(1,2)")
 sage: a.sign()
 -1
 }}}

 The proposal is to add sign as an alias to signature for the class
 'sage.combinat.permutation.Permutation_class' by adding a single line to
 sage/combinat/permutation.py saying "sign = signature"

 '''Apply''':

 1.   [attachment:13431_signadd-v2.patch]

--

Comment:

 Looks good!  Positive review.

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