Skip to content

Commit 68ea174

Browse files
author
Mike Kistler
committed
Add utility method to convert lists to csv.
1 parent ab2738a commit 68ea174

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

watson_developer_cloud/watson_service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ def _convert_model(val):
227227
return val._to_dict()
228228
return val
229229

230+
@staticmethod
231+
def _convert_list(val):
232+
if isinstance(val, list):
233+
return ",".join(val)
234+
return val
235+
230236
@staticmethod
231237
def _encode_path_vars(*args):
232238
return (requests.utils.quote(x, safe='') for x in args)

0 commit comments

Comments
 (0)