# Class e.c.p.UriPattern(Pattern):

Part of elisa.core.pattern_matcher View In Hierarchy

Pattern object used to sort URI regex patterns based on the number of path components in the regex.

Take the following example: >>> uri_a = UriPattern('http://first_level/.*') >>> uri_b = UriPattern('http://first_level/second_level/.*') >>> uri_a < uri_b True

This is needed by UriPatternMatcher to keep URI patterns sorted in order to match strings starting by the most specific pattern first.

Line # | Kind | Name | Docs
--- | --- | --- | ---
161 | Method | __init__ |
165 | Method | __cmp__ | Undocumented

Inherited from Pattern:

Line # | Kind | Name | Docs
--- | --- | --- | ---
64 | Method | __repr__ | Undocumented

def __init__(self, regex, obj):
overrides elisa.core.pattern_matcher.Pattern.__init__

Raises | InvalidPatter | when compiling the `regex` fails

def __cmp__(self, other):
overrides elisa.core.pattern_matcher.Pattern.__cmp__
Undocumented