updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / python3-wisent / grammar.patch
blobef532ed1b94b4654758545b3f921d61a2fa978fb
1 --- src/wisent-0.6/grammar.py.orig 2010-05-27 01:38:30.208235239 +0300
2 +++ src/wisent-0.6/grammar.py 2010-05-27 01:40:24.634859929 +0300
3 @@ -192,6 +192,20 @@
4 """Return the `label` given at object construction."""
5 return self.label
7 + def __lt__(self, other):
8 + if isinstance(other, str):
9 + return self.label < other
10 + if isinstance(other, Unique):
11 + return self.label < other.label
12 + return NotImplemented()
14 + def __gt__(self, other):
15 + if isinstance(other, str):
16 + return self.label > other
17 + if isinstance(other, Unique):
18 + return self.label > other.label
19 + return NotImplemented()
21 class Grammar(object):
23 """Represent a context free grammar."""