mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-30 19:14:43 +00:00
syntax
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3060 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
bd8bfa06a3
commit
287ec3b960
1 changed files with 10 additions and 12 deletions
|
|
@ -152,12 +152,11 @@ def timeit (func, log=sys.stderr):
|
|||
|
||||
|
||||
class memoized (object):
|
||||
"""
|
||||
Decorator that caches a function's return value each time it is called.
|
||||
If called later with the same arguments, the cached value is returned, and
|
||||
not re-evaluated.
|
||||
"""
|
||||
|
||||
"""
|
||||
Decorator that caches a function's return value each time it is called.
|
||||
If called later with the same arguments, the cached value is returned, and
|
||||
not re-evaluated.
|
||||
"""
|
||||
def __init__(self, func):
|
||||
self.func = func
|
||||
self.cache = {}
|
||||
|
|
@ -179,12 +178,11 @@ class memoized (object):
|
|||
|
||||
|
||||
class curried (object):
|
||||
"""
|
||||
Decorator that returns a function that keeps returning functions
|
||||
until all arguments are supplied; then the original function is
|
||||
evaluated.
|
||||
"""
|
||||
|
||||
"""
|
||||
Decorator that returns a function that keeps returning functions
|
||||
until all arguments are supplied; then the original function is
|
||||
evaluated.
|
||||
"""
|
||||
def __init__(self, func, *a):
|
||||
self.func = func
|
||||
self.args = a
|
||||
|
|
|
|||
Loading…
Reference in a new issue