[Elisa-commits] [MERGE] PatternMatcher
Benjamin Kampmann
benjamin at fluendo.com
Mon Apr 21 17:03:59 CEST 2008
Alessandro schrieb:
> Hi,
>
> this changeset contains some the code that is needed to implement UI
> extensibility for the pigment frontend. I think it could be reused for
> the ResourceManager as well so I put it in a separate class in core.
>
> Alessandro
>
bb:tweak
[...]
+class UriPattern(Pattern):
+ def __cmp__(self, other):
+ if not isinstance(other, self.__class__):
+ return NotImplemented
+
+ return cmp(self.regex.count('/'), other.regex.count('/'))
Some documentation would be really usefull.
Beside this it looks fine for me.
Benjamin
More information about the Elisa-commits
mailing list