Merge pull request #5 from 20-2-SKKU-OSS/sumin

variables 파일 주석 추가 및 줄간격 수정
This commit is contained in:
yunminjin2 2020-12-05 19:32:00 +09:00 committed by GitHub
commit e9c8cf1aba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,11 +6,11 @@ try:
except ImportError:
from collections import Mapping, Sequence
from copy import deepcopy
from . import utils
from . import pycompat
# Check whether code needs parentheses or not. If parentheses are needed, return true
def needs_parentheses(source):
def code(s):
return compile(s, '<variable>', 'eval').co_code
@ -33,6 +33,7 @@ class BaseVariable(pycompat.ABC):
main_value = eval(self.code, frame.f_globals or {}, frame.f_locals)
except Exception:
return ()
return self._items(main_value, normalize)
@abc.abstractmethod