#14136: P-partition enumerators in QSym
------------------------------------------------------+---------------------
       Reporter:  darij                               |         Owner:  
sage-combinat
           Type:  enhancement                         |        Status:  
needs_info   
       Priority:  minor                               |     Milestone:  
sage-5.11    
      Component:  combinatorics                       |    Resolution:          
     
       Keywords:  QSym, P-partitions, posets, days45  |   Work issues:          
     
Report Upstream:  N/A                                 |     Reviewers:          
     
        Authors:  darij                               |     Merged in:          
     
   Dependencies:                                      |      Stopgaps:          
     
------------------------------------------------------+---------------------

Comment (by strogdon):

 This is somewhat non-intuitive but the following seems to work
 {{{
 sage: import warnings
 sage: warnings.simplefilter('error', DeprecationWarning)
 sage: import functools
 sage: def f(x, y): return x^y
 sage: g = functools.partial(f, 2, 3)
 sage: g()
 8
 sage: class mypartial(functools.partial):
 ....:     def __init__(self, f, i, j):
 ....:         functools.partial.__init__(self)
 ....:
 sage: g = mypartial(f, 2, 3)
 sage: g()
 8
 }}}
 or
 {{{
 sage: class mynewpartial(functools.partial):
 ....:     def __init__(self, f, i, j):
 ....:         super(mynewpartial, self).__init__()
 ....:
 sage: g = mynewpartial(f, 2, 3)
 sage: g()
 8
 }}}
 This perhaps suggests the {{{__init__}}} method of the {{{BoundClass}}}
 should be
 {{{
     def __init__(self, *args):
         super(BoundClass, self).__init__()
         self.__doc__ = self.func.__doc__
 }}}
 instead of
 {{{
         super(BoundClass, self).__init__(*args)
 }}}
 I don't know whether this breaks anything?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14136#comment:20>
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/groups/opt_out.


Reply via email to