def parseOne(source):
    """ Parses only the next type object from source and returns it together
        with the remaining [possibly empty] string as an object, string tuple.
    """
    src = _tokenize(source)
    obj = _parse(src.next(), src)
    try:
        next = src.next()
    except StopIteration:
        rest = ""
    else:
        rest = source.split('\n')[next[2][0] - 1:]
        if len(rest) == 0:
            rest = ""
        else:
            rest[0] = rest[0][next[2][1]:]
            rest = '\n'.join(rest)
    finally:
        return obj, rest
 Parses only the next type object from source and returns it together
        with the remaining [possibly empty] string as an object, string tuple.
    
recipes/Python/511473_typeparser/recipe-511473.py