def is_collection(obj):

    if isinstance(obj, basestring):
        return False

    return hasattr(obj, '__getitem__')
save a Query: line
dataset/ETHPy150Open kennethreitz/clint/clint/utils.py/is_collection--crossover with--dataset/ETHPy150Open cjlee112/pygr/pygr/parse_blast.py/BlastHitParser.save_query_line