update doc for list.tolist

This commit is contained in:
Prodesire 2018-01-17 00:22:01 +08:00
parent a630cb59e0
commit 54a9753c54
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ List
Convert given ``obj`` to list.
If ``obj`` is not a list, return [``obj``], else return ``obj`` itself.
If ``obj`` is not a list, return ``[obj]``, else return ``obj`` itself.
>>> from pydu.list import tolist
>>> tolist('foo')

View File

@ -21,7 +21,7 @@ def tolist(obj):
"""
Convert given `obj` to list.
If `obj` is not a list, return [`obj`], else return `obj` itself.
If `obj` is not a list, return `[obj]`, else return `obj` itself.
"""
if not isinstance(obj, list):
return [obj]