Skip to content

Commit fd908a0

Browse files
committed
Docs
1 parent 639ced1 commit fd908a0

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

fs/info.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ def name(self):
185185
@property
186186
def suffix(self):
187187
# type: () -> Text
188-
"""`str`: the final resource extension (including dot), or an
189-
empty string if there is no extension.
188+
"""`str`: the last component of the name (including dot), or an
189+
empty string if there is no suffix.
190190
191191
Example:
192192
>>> info
@@ -203,7 +203,7 @@ def suffix(self):
203203
@property
204204
def suffixes(self):
205205
# type: () -> List[Text]
206-
"""`List`: a list of the resource's extensions.
206+
"""`List`: a list of any suffixes in the name.
207207
208208
Example:
209209
>>> info
@@ -219,7 +219,15 @@ def suffixes(self):
219219
@property
220220
def stem(self):
221221
# type: () -> Text
222-
"""`str`: the name minus any extensions."""
222+
"""`str`: the name minus any suffixes.
223+
224+
Example:
225+
>>> info
226+
<info 'foo.tar.gz'>
227+
>>> info.stem
228+
'foo'
229+
230+
"""
223231
name = self.get('basic', 'name')
224232
if name.startswith('.'):
225233
return name

0 commit comments

Comments
 (0)