Inheritence |
|
This pattern matching object can be used to test if values fall in a certain range or value set, or to produce an array of values from a pattern.
Methods
__init__(pattern)
Constructs a new pattern object from the specified string.
contains(value)
→ bool
Returns True if the specified value is in the pattern, or false if it is not. Note that ranges are inclusive for the first value in the range and exclude the last value in the range.
floatArray(sorted=True)
→ list
of float
Returns the float array values for the pattern. If sorted
is True
the
values are sorted in ascending numeric order.
intArray(sorted=True)
→ list
of int
Returns the int array values for the pattern. If sorted
is True
the
values are sorted in ascending numeric order.
stringArray(sorted=True)
→ list
of str
Returns the string array values for the pattern. If sorted
is True
the
values are sorted in ascending natural sorder order.
Methods from pdg.BasePattern
errors
: str
Property
If the pattern is invalid, this string contains the parse errors.
isValid
: bool
Property
Set to True if the pattern is valid, else False.
pattern
: str
Property
The source string used to construct this pattern object.