interating over single element array

Basilisk96 basilisk96 at gmail.com
Sat Jun 9 14:16:08 CEST 2007


"Terry Reedy" <tjre... at udel.edu> wrote:
> Any what if 'filelist' is any iterable other than a string or list?  Your
> code is broken, and unnecessarily so.  So I would call the parameter
> 'files' and test for isinstance(files, str) #or basestring.  And wrap if it
> is.

Can you give an example of such an iterable (other than a tuple)? I'd
certainly like to fix my 'fix' to work for a more general case.

Regards,
-Basilisk96




More information about the Python-list mailing list