diff options
author | Ryan Petrello <lists@ryanpetrello.com> | 2014-01-07 16:23:31 -0500 |
---|---|---|
committer | Ryan Petrello <lists@ryanpetrello.com> | 2014-01-07 16:23:31 -0500 |
commit | 832c59ffbdef5833c8865f9defdfade285c76b46 (patch) | |
tree | 7ba1f3cadfda0e7c032d0a61684bbd1a840d539e /pecan/util.py | |
parent | 1256298632151c5d5324375e53bb5a11cdf1a050 (diff) | |
download | pecan-832c59ffbdef5833c8865f9defdfade285c76b46.tar.gz |
Fix a memory leak in pecan.util.memodict
Change-Id: Id50ca4d689fa09b15b0928e6e20d336f93a1e85c
Fixes-bug: 1266908
Diffstat (limited to 'pecan/util.py')
-rw-r--r-- | pecan/util.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/pecan/util.py b/pecan/util.py index cf62f97..aa2e683 100644 --- a/pecan/util.py +++ b/pecan/util.py @@ -1,21 +1,10 @@ import sys -def memodict(f): - """ Memoization decorator for a function taking a single argument """ - class memodict(dict): - def __missing__(self, key): - ret = self[key] = f(key) - return ret - return memodict().__getitem__ - - -@memodict def iscontroller(obj): return getattr(obj, 'exposed', False) -@memodict def _cfg(f): if not hasattr(f, '_pecan'): f._pecan = {} |