How do I distinguish a string from a sequence?

David Bolen db3l at fitlinxx.com
Fri Sep 28 17:04:04 EDT 2001


"Tim Peters" <tim.one at home.com> writes:

> Stick in tests to cover that too, and you'll soon appreciate why I settled
> for
> 
>     type(args) in types.StringTypes
> 
> at the start <wink>.

Although it looks like you have to be using 2.2 for that to work,
right?  A quick check on my system of 1.5.2 through 2.1.1 doesn't have
a StringTypes list in the types module (although it could of course
just be defined locally if not present).

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list