Message122907
> > len(data) will raise anyway.
>
> No, it won't, if the iterable happens to be a sequence.
Well, it seems the patch is confused between iterable and iterator. Only
iterators have a __next__, but they usually don't have a __len__.
The patch should really check for iterables, so it should use:
if isinstance(data, collections.Iterable)
raise ValueError#etc. |
|
Date |
User |
Action |
Args |
2010-11-30 15:43:51 | pitrou | set | recipients:
+ pitrou, jhylton, rhettinger, orsenthil, catlee, eric.araujo, rcoyner, xuanji, davide.rizzo |
2010-11-30 15:43:49 | pitrou | link | issue3243 messages |
2010-11-30 15:43:49 | pitrou | create | |
|