(source_bytes)
return newline_decoder.decode(source_bytes.decode(encoding[0]))
Decode bytes representing source code and return the string.

    Universal newline support is used in the decoding.
Decode bytes representing source code and return the string.
Decode bytes representing source code and return the string .
def decode_source(source_bytes):
    """Decode bytes representing source code and return the string.

    Universal newline support is used in the decoding.
    """
    import tokenize  # To avoid bootstrap issues.
    source_bytes_readline = _io.BytesIO(source_bytes).readline
    encoding = tokenize.detect_encoding(source_bytes_readline)
    newline_decoder = _io.IncrementalNewlineDecoder(None, True)
    return newline_decoder.decode(source_bytes.decode(encoding[0]))
def decode_source ( source_bytes ) : import tokenize # To avoid bootstrap issues. source_bytes_readline = _io . BytesIO ( source_bytes ) . readline encoding = tokenize . detect_encoding ( source_bytes_readline ) newline_decoder = _io . IncrementalNewlineDecoder ( None , True ) return newline_decoder . decode ( source_bytes . decode ( encoding [ 0 ] ) )