Пример #1
0
 def __init__(self, regex, to, count = 0):
   from atta.tools.Misc import isstring
   if isstring(regex):
     self.regex = re.compile(regex)
   else:
     self.regex = regex
   self.to = to
   self.count = count
Пример #2
0
 def Bool(v):
   if isstring(v):
     v = v.lower()
     return v == '1' or v == Dict.true or v == Dict.yes
   return bool(v)