示例#1
0
 def __defListValue(self, valueClass, valueDef, numValue):
     if (len(valueDef) > 3) and (valueDef[3] != None):
         numValue = valueDef[3]
         assert(isinstance(numValue, int))
     val = self.__createValue(valueClass, valueDef[0], numValue, valueDef[1])
     if (len(valueDef) > 2) and (valueDef[2] != None):
         if not isListLike(valueDef[2]):
             raise TypeError("valueDef[2] must be None, a list or tuple, found: " + str(valueDef[2]))
         for a in valueDef[2]:
             self.aliases[a] = val
示例#2
0
 def enabled(self, flag):
     """determine if tracing is enabled for the specified flag, flag can be
     either a single flag or sequence of flags"""
     if typeOps.isListLike(flag):
         for f in flag:
             if f in self.flags:
                 return True
         return False
     else:
         return (flag in self.flags)
示例#3
0
 def enabled(self, flag):
     """determine if tracing is enabled for the specified flag, flag can be
     either a single flag or sequence of flags"""
     if typeOps.isListLike(flag):
         for f in flag:
             if f in self.flags:
                 return True
         return False
     else:
         return (flag in self.flags)
示例#4
0
 def __defValue(self, valueClass, valueDef, numValue):
     if isListLike(valueDef):
         return self.__defListValue(valueClass, valueDef, numValue)
     else:
         return self.__createValue(valueClass, valueDef, numValue, valueDef)