Message122707
| Author |
rhettinger |
| Recipients |
catlee, eric.araujo, jhylton, orsenthil, rcoyner, rhettinger, xuanji |
| Date |
2010年11月28日.19:10:13 |
| SpamBayes Score |
0.0006871264 |
| Marked as misclassified |
No |
| Message-id |
<1290971414.92.0.0620817460889.issue3243@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Instead of
hasattr(str,'next')
consider using
isinstance(str, collections.Iterable)
Also consider changing the variable name from the now overly type specific, "str" to something like "source" to indicate the significance of the data, not its type. |
|