back out decorator change

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3002 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2006-01-03 01:09:23 +00:00
parent bc846a20ff
commit b4748cdcee

View file

@ -55,10 +55,6 @@ def update_func_meta (fake_func, real_func):
return fake_func
# helper method to have decorators with arguments
decorator_with_args = lambda decorator: lambda *args, **kwargs: lambda func: decorator(func, *args, **kwargs)
def deprecated (func):
"""
A decorator which can be used to mark functions as deprecated.
@ -99,8 +95,7 @@ def signal_handler (signal_number):
return newfunc
@decorator_with_args
def synchronized (lock, func):
def _synchronized (lock, func):
"""
Call function with aqcuired lock.
"""
@ -116,6 +111,13 @@ def synchronized (lock, func):
return update_func_meta(newfunc, func)
def synchronized (lock):
"""
A decorator calling a function with aqcuired lock.
"""
return lambda func: _synchronized(lock, func)
def notimplemented (func):
"""
Raises a NotImplementedError if the function is called.