Trees | Indices | Help |
|
---|
|
Module implementing the parameter types code.
|
|||
_WrapperBase | |||
_DescWrapper Wrapper class for description text. |
|||
_CommentWrapper Wrapper class for comment. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
_PAREN_RE = re.compile("^[a-zA-Z0-9_-]+$")
|
|||
NoDefault = object() The without-default default value |
|||
NoType = object() The no-type (value too complex to check it in the type system) |
|||
TNonEmptyString = WithDesc("NonEmptyString")(TAnd(TString, TTr a non-empty string |
|||
TMaybeString = TMaybe(TNonEmptyString) a maybe non-empty string |
|||
TNonNegativeInt = TAnd(TInt, WithDesc("EqualOrGreaterThanZero" a non-negative integer (value >= 0) |
|||
TPositiveInt = TAnd(TInt, WithDesc("GreaterThanZero")(lambda v a positive integer (value > 0) |
|||
TMaybePositiveInt = TMaybe(TPositiveInt) a maybe positive integer (positive integer or None) |
|||
TNegativeInt = TAnd(TInt, WithDesc("LessThanZero")(compat.part a negative integer (value < 0) |
|||
TNonNegativeFloat = TAnd(TFloat, WithDesc("EqualOrGreaterThanZ a positive float |
|||
TJobId = WithDesc("JobId")(TOr(TNonNegativeInt, TRegex(re.comp Job ID |
|||
TNumber = TOr(TInt, TFloat) Number |
|||
TRelativeJobId = WithDesc("RelativeJobId")(TNegativeInt) Relative job ID |
|||
TMaybeListOf = lambda item_type:
|
Imports: re, operator, compat, utils, constants
|
Enclose text in parens if necessary.
|
Builds wrapper class with description text.
|
Builds wrapper for adding comment to description text.
|
Build description for combinating operator.
|
Returns an empty list.
|
Returns an empty dict.
|
Accepts any value.
|
Checks if the given value is not None.
|
Checks if the given value is None.
|
Checks if the given value is constants.VALUE_NONE.
|
Checks if the given value is a boolean.
|
Checks if the given value is an integer.
|
Checks if the given value is a float.
|
Checks if the given value is a string.
|
Checks if a given value evaluates to a boolean True value.
|
Checks if the given value is a list.
|
Checks if the given value is a tuple.
|
Checks if the given value is a dictionary.
|
Checks whether a string matches a specific regular expression.
|
Wrap a test in a TOr(TNone, test). This makes it easier to define TMaybe* types. |
a maybe boolean (bool or none)
|
Maybe a dictionary (dict or None)
|
Checks if a given value is an instance of
|
Strict dictionary check with specific keys.
|
Checks individual items of a container. If the verified value and the list of expected items differ in length, this check considers only as many items as are contained in the shorter list. Use TIsLength to enforce a certain length.
|
|
TNonEmptyStringa non-empty string
|
TNonNegativeInta non-negative integer (value >= 0)
|
TPositiveInta positive integer (value > 0)
|
TNegativeInta negative integer (value < 0)
|
TNonNegativeFloata positive float
|
TJobIdJob ID
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Dec 3 11:32:30 2013 | http://epydoc.sourceforge.net |