mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-09 15:14:45 +00:00
add notimplemented
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2801 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
2377c8a8d0
commit
37e8e21df6
1 changed files with 20 additions and 0 deletions
|
|
@ -29,6 +29,11 @@ def g ():
|
|||
"this function is deprecated"
|
||||
pass
|
||||
|
||||
@notimplemented
|
||||
def h ():
|
||||
"todo"
|
||||
pass
|
||||
|
||||
"""
|
||||
import warnings
|
||||
import signal
|
||||
|
|
@ -102,3 +107,18 @@ def synchronized (lock):
|
|||
return _synchronized(lock, function)
|
||||
return newfunc
|
||||
|
||||
|
||||
def notimplemented (func)
|
||||
"""
|
||||
Raises a NotImplementedError if the function is called.
|
||||
def newfunc (*args, **kwargs):
|
||||
"""
|
||||
def newfunc (*args, **kwargs):
|
||||
"""
|
||||
Raise NotImplementedError
|
||||
"""
|
||||
raise NotImplementedError("%s not implemented" % func.__name__)
|
||||
newfunc.__name__ = func.__name__
|
||||
newfunc.__doc__ = func.__doc__
|
||||
newfunc.__dict__.update(func.__dict__)
|
||||
return newfunc
|
||||
|
|
|
|||
Loading…
Reference in a new issue