def _read(path, encoding="<STR_LIT:utf-8>", comment="<STR_LIT>"):
if path:<EOL><INDENT>if isinstance(path, basestring) and os.path.exists(path):<EOL><INDENT>if PY2:<EOL><INDENT>f = codecs.open(path, '<STR_LIT:r>', encoding='<STR_LIT:utf-8>')<EOL><DEDENT>else:<EOL><INDENT>f = open(path, '<STR_LIT:r>', encoding='<STR_LIT:utf-8>')<EOL><DEDENT><DEDENT>elif isinstance(path, basestring):<EOL><INDENT>f = path.splitlines()<EOL><DEDENT>else:<EOL><INDENT>f = path<EOL><DEDENT>for i, line in enumerate(f):<EOL><INDENT>line = line.strip(codecs.BOM_UTF8) if i == <NUM_LIT:0> and isinstance(line, binary_type) else line<EOL>line = line.strip()<EOL>line = decode_utf8(line, encoding)<EOL>if not line or (comment and line.startswith(comment)):<EOL><INDENT>continue<EOL><DEDENT>yield line<EOL><DEDENT><DEDENT>return<EOL>
Returns an iterator over the lines in the file at the given path,
        strippping comments and decoding each line to Unicode.