def type(self, _type):
     if _type is None:
         raise TypeError("Type cannot be None")
     if _type not in AbstractType.supportedTypes():
         raise TypeError(
             "The type is not supported, please refer to the list of supported type in AbstractType.supportedTypes()"
         )
     self.__type = _type
示例#2
0
 def type(self, _type):
     if _type is None:
         raise TypeError("Type cannot be None")
     if _type not in AbstractType.supportedTypes():
         raise TypeError(
             "The type is not supported, please refer to the list of supported type in AbstractType.supportedTypes()"
         )
     self.__type = _type
示例#3
0
    def supportedTypes():
        """Official list of supported types

        @deprecated: please use directly the AbstractType.supportedTypes() method instead of this wrapper.
        """
        return AbstractType.supportedTypes()