import types, itertools, re, bisect
import logging as log
+
from moe import MoeError
+
"Allowed depth of recursion - includes ALL recursive calls, so should quite high."
c_maxdepth = 256
"Variable name regexp, dots (separators) must be separated from edges and each other."
re_VARNAME = re.compile(r'\A([A-Za-z0-9_-]+\.)*[A-Za-z0-9_-]+\Z')
+
def check_depth(depth):
"Helper to check for recursion depth."
global debug_maxdepth
self.variables[key] = ConfigVar(key)
return self.variables[key]
+ def __getitem__(self, key)
+ """
+ Return the value of an existing variable.
+ """
+ return self.lookup(key, create=False).value()
+
def dump(self, prefix=''):
"""
Pretty printing of the tree.