Skip to content

Commit a47b18b

Browse files
committed
a few more doc string fixes in cboo
svn path=/branches/v0_91_maint/; revision=5179
1 parent 5985b7b commit a47b18b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/cbook.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,21 +202,25 @@ def unique(x):
202202
return dict([ (val, 1) for val in x]).keys()
203203

204204
def iterable(obj):
205+
'return true if obj is iterable'
205206
try: len(obj)
206207
except: return 0
207208
return 1
208209

209210

210211
def is_string_like(obj):
212+
'return true if obj looks like a string'
211213
if hasattr(obj, 'shape'): return 0
212214
try: obj + ''
213215
except (TypeError, ValueError): return 0
214216
return 1
215217

216218
def is_writable_file_like(obj):
219+
'return true if obj looks like a file object'
217220
return hasattr(obj, 'write') and callable(obj.write)
218221

219222
def is_scalar(obj):
223+
'return true if ob is not string like and is not iterable'
220224
return is_string_like(obj) or not iterable(obj)
221225

222226
def is_numlike(obj):

0 commit comments

Comments
 (0)