update from Atlas repo

This commit is contained in:
Luciano Ramalho committed 2014-12-21 09:01:11 -02:00
1 parent 33d65dc590
commit 9db73c75ef
6 files changed
+159 -1

No files matched your search

+4 -1
View File
@@ -17,5 +17,8 @@ class Sentence:
def __getitem__(self, index):
return self.words[index] # <2>
def __len__(self, index): # <3>
return len(self.words)
def __repr__(self):
return 'Sentence(%s)' % reprlib.repr(self.text) # <3>
return 'Sentence(%s)' % reprlib.repr(self.text) # <4>
+3
View File
@@ -34,6 +34,9 @@ class SentenceSlice:
else:
return self.words[position]
def __len__(self, index):
return len(self.words)
# helper functions -- implementation detail
def _handle_defaults(self, position):
"""handle missing or overflow/underflow start/stop"""