Newbie - How to iterate list or scalar ?
Andy Dingley
dingbat at codesmiths.com
Tue Aug 8 12:25:34 EDT 2006
Bruno Desthuilliers wrote:
> there's really no reason to
> assume it should be a list - any iterable could - and IMHO should - be
> accepted... expect of course for strings (royal PITA case, duh).
> 2/ test for pluginVersionsNeeded.__iter__ (an attribute of most
> iterables except strings...):
strings don't have __iter__ ?!?!
I'm never going to get my head round this language 8-(
I can understand strings and tuples being iterable, if you take a
sufficiently first-class view of things, but why shouldn't everything
"that is iterable" support the function that makes iteration work?
More information about the Python-list
mailing list