1
0
forked from VimPlug/jedi

underscore_memoization is now even easier in fast parser

This commit is contained in:
Dave Halter
2014-01-15 15:57:43 +01:00
parent d71cdded6e
commit 059b1e1353
2 changed files with 10 additions and 19 deletions

View File

@@ -131,19 +131,6 @@ def underscore_memoization(func):
return wrapper
def underscore_none_memoization(func):
"""Like ``underscore_memoization`` just with None instead of exceptions."""
def wrapper(self):
name = '_' + func.__name__
value = getattr(self, name)
if value is None:
value = func(self)
setattr(self, name, value)
return value
return wrapper
def cache_star_import(func):
def wrapper(evaluator, scope, *args, **kwargs):
with common.ignored(KeyError):