return val is None
+@WithDesc("ValueNone")
+def TValueNone(val):
+ """Checks if the given value is L{constants.VALUE_NONE}.
+
+ """
+ return val == constants.VALUE_NONE
+
+
@WithDesc("Boolean")
def TBool(val):
"""Checks if the given value is a boolean.
return isinstance(val, list)
+@WithDesc("Tuple")
+def TTuple(val):
+ """Checks if the given value is a tuple.
+
+ """
+ return isinstance(val, tuple)
+
+
@WithDesc("Dictionary")
def TDict(val):
"""Checks if the given value is a dictionary.
return TOr(TNone, test)
+def TMaybeValueNone(test):
+ """Used for unsetting values.
+
+ """
+ return TMaybe(TOr(TValueNone, test))
+
+
# Type aliases
#: a non-empty string