# HG changeset patch
# User Alexandre Blondin Masse < alexandre.blondin.masse at gmail.com>
# Date 1271471337 14400
# Node ID 0d63812644859f29fab2ee98e29d368f14e6313c
# Parent 45575d41f639424df94869c426da3fd1e2d8e01d
#8574 minor corrections review
diff --git a/sage/combinat/words/abstract_word.py b/sage/combinat/words/abstract_word.py
a
|
b
|
class Word_class(SageObject): |
149 | 149 | |
150 | 150 | def __len__(self): |
151 | 151 | r""" |
152 | | Return the length of self (as a python integer). |
| 152 | Returns the length of self (as a python integer). |
153 | 153 | |
154 | 154 | ..NOTE:: |
155 | 155 | |
156 | | For infinite words or words of unknown length, use length method |
157 | | instead. |
| 156 | For infinite words or words of unknown length, |
| 157 | use `length()` method instead. |
158 | 158 | |
159 | 159 | OUTPUT: |
160 | 160 | |
… |
… |
class Word_class(SageObject): |
173 | 173 | sage: len(s('1')) |
174 | 174 | 100 |
175 | 175 | |
176 | | For infinite word:: |
| 176 | For infinite words:: |
177 | 177 | |
178 | 178 | sage: len(Word(lambda n:n)) |
179 | 179 | Traceback (most recent call last): |
… |
… |
class Word_class(SageObject): |
184 | 184 | ... |
185 | 185 | TypeError: Python len method can not return a non integer value (=+Infinity): use length method instead. |
186 | 186 | |
187 | | For word of unknown length:: |
| 187 | For words of unknown length:: |
188 | 188 | |
189 | 189 | sage: len(Word(iter('a'*200), length='unknown')) |
190 | 190 | Traceback (most recent call last): |