Home | Trees | Index | Help |
|
---|
Package CedarBackup2 :: Module util :: Class RegexMatchList |
|
object
--+ |list
--+ |UnorderedList
--+ | RegexMatchList
Class representing a list containing only strings that match a regular expression.
If emptyAllowed
is passed in as False
, then
empty strings are explicitly disallowed, even if they happen to match the
regular expression. (None
values are always disallowed,
since string operations are not permitted on None
.)
This is an unordered list.
We override theappend
, insert
and
extend
methods to ensure that any item added to the list
matches the indicated regular expression.
Note: If you try to put values that are not strings into the list, you will likely get either TypeError or AttributeError exceptions as a result.
Method Summary | |
---|---|
Initializes a list restricted to containing certain values. | |
Overrides the standard append method. | |
Overrides the standard insert method. | |
Overrides the standard insert method. | |
Inherited from UnorderedList | |
Definition of == operator for this class. | |
Definition of ≥ operator for this class. | |
Definition of > operator for this class. | |
Definition of ≤ operator for this class. | |
Definition of < operator for this class. | |
Definition of != operator for this class. | |
Inherited from list | |
x.__add__(y) <==> x+y | |
x.__contains__(y) <==> y in x | |
x.__delitem__(y) <==> del x[y] | |
Use of negative indices is not supported. | |
x.__getattribute__('name') <==> x.name | |
x.__getitem__(y) <==> x[y] | |
Use of negative indices is not supported. | |
x.__hash__() <==> hash(x) | |
x.__iadd__(y) <==> x+=y | |
x.__imul__(y) <==> x*=y | |
x.__iter__() <==> iter(x) | |
x.__len__() <==> len(x) | |
x.__mul__(n) <==> x*n | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
x.__repr__() <==> repr(x) | |
L.__reversed__() -- return a reverse iterator over the list | |
x.__rmul__(n) <==> n*x | |
x.__setitem__(i, y) <==> x[i]=y | |
Use of negative indices is not supported. | |
L.count(value) -> integer -- return number of occurrences of value | |
L.index(value, [start, [stop]]) -> integer -- return first index of value | |
L.pop([index]) -> item -- remove and return item at index (default last) | |
L.remove(value) -- remove first occurrence of value | |
L.reverse() -- reverse *IN PLACE* | |
L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*; cmp(x, y) -> -1, 0, 1 | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Method Details |
---|
__init__(self,
valuesRegex,
emptyAllowed=True)
Initializes a list restricted to containing certain values.
|
append(self, item)Overrides the standardappend method.
|
extend(self, seq)Overrides the standardinsert method.
|
insert(self, index, item)Overrides the standardinsert method.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Mar 29 20:58:30 2007 | http://epydoc.sf.net |