#13109: Rewrite deprecation to use trac ticket numbers
--------------------------------+-------------------------------------------
Reporter: vbraun | Owner: mvngu
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.1
Component: doctest | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Volker Braun | Merged in:
Dependencies: | Stopgaps:
--------------------------------+-------------------------------------------
Comment (by klee):
I am just curious why we don't use a consistent style in deprecating
functions. I would prefer the following style using decorators as I like
the `@rename_keyword` decorator. But I am not competent enough to be sure
if it is technically sound or even possible to use decorators for other
deprecation situations.
{{{
from sage.misc.decorators import rename_keyword, rename_function,
deprecate
class Foo(SageObject):
@deprecate(3333,'You can just call f() instead')
def terrible_idea(self):
return 1
@rename_function(4444, much_better_name)
def bad_name(self):
return 1
@rename_keyword(deprecation=5555, weird_keyword='nice_keyword')
def f(self, nice_keyword=True):
return 1
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13109#comment:17>
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.