mirror of https://github.com/flaggo/pydu.git
update doc for list.tolist
This commit is contained in:
parent
a630cb59e0
commit
54a9753c54
|
@ -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')
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue