#14054: Cythoned UniqueRepresentation
-----------------------------------------------+----------------------------
       Reporter:  SimonKing                    |         Owner:  tbd            
 
           Type:  enhancement                  |        Status:  needs_review   
 
       Priority:  major                        |     Milestone:  sage-5.8       
 
      Component:  performance                  |    Resolution:                 
 
       Keywords:  cython UniqueRepresentation  |   Work issues:                 
 
Report Upstream:  N/A                          |     Reviewers:  Travis 
Scrimshaw
        Authors:  Simon King                   |     Merged in:                 
 
   Dependencies:  #14017, #6495, #14159        |      Stopgaps:                 
 
-----------------------------------------------+----------------------------

Comment (by tscrim):

 Replying to [comment:39 SimonKing]:
 > Perhaps like this:
 > {{{
 >             sage: from sage.misc.superseded import
 deprecated_function_alias
 >             sage: g = deprecated_function_alias(13109,
 number_of_partitions)
 > }}}

 That might work, but I haven't tried it (in principle, I don't see why it
 wouldn't). What I've done is like this:
 {{{
 def DeprecatedClass(self, arg1, arg2, ..., *old_args, **old_kwds):
     from sage.misc.superseded import deprecation
     deprecation(14054, "DepC is deprecated. Use path.to.new_mod.NewClass
 instead")
     # Do whatever needs to be done to convert to NewClass's inputs
     from path.to.new_mod import NewClass
     return NewClass(arg1, arg2, ..., *old_args, **old_kwds)
 }}}
 However that's a good point about the inheritance...perhaps something like
 {{{
 class Dep(NewClass):
     def __init__(self, arg1, arg2, ..., *args, **kwds):
         from sage.misc.superseded import deprecation
         deprecation(14054, "DepC is deprecated. Use
 path.to.new_mod.NewClass instead")
         NewClass.__init__(self, arg1, arg2, ..., *args, **kwds)
 }}}
 ?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14054#comment:41>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to