From 54a9753c5422bf1a6157bc7bf22e0cf20c29cb68 Mon Sep 17 00:00:00 2001 From: Prodesire Date: Wed, 17 Jan 2018 00:22:01 +0800 Subject: [PATCH] update doc for list.tolist --- docs/list.rst | 2 +- pydu/list.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/list.rst b/docs/list.rst index ddd6b3c..a7a617c 100644 --- a/docs/list.rst +++ b/docs/list.rst @@ -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') diff --git a/pydu/list.py b/pydu/list.py index 93e4258..e51201d 100644 --- a/pydu/list.py +++ b/pydu/list.py @@ -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]