Testing for a list

John Baxter jwbaxter at spamcop.net
Tue Mar 11 01:17:08 EST 2003


In article <mailman.1047326057.17831.python-list at python.org>,
 "Antun Karlovac" <antun at antunkarlovac.com> wrote:

> I guess you're right. For this particular application, I could just always 
> have a
> list, even if it's only got one item in it.

And, in some situations, if you get a non-list (by whichever of the 
various meanings is most useful), you can turn what you got into a 
one-item list containing what you got and press on.  Whether that's 
appropriate depends on the problem.

  --John




More information about the Python-list mailing list