On Jun 11, 10:28 pm, Ian Kelly <ian.g.ke...@gmail.com> wrote: > > Since there is no way to distinguish the two cases by the arguments,
def deprecated(func=None, replacement=None): if replacement: # handle the case where a replacement has been given elif func: # handle the case where no replacement has been given else: raise ValueErrorOrSomethingLikeThis() @deprecated(replacement=other_func): def some_func(args): # code here @deprecated def another_func(args): # code here My 2 cents... -- http://mail.python.org/mailman/listinfo/python-list