• Nick Coghlan's avatar
    Issue #19619: Blacklist non-text codecs in method API · c72e4e6d
    Nick Coghlan yazdı
    str.encode, bytes.decode and bytearray.decode now use an
    internal API to throw LookupError for known non-text encodings,
    rather than attempting the encoding or decoding operation and
    then throwing a TypeError for an unexpected output type.
    
    The latter mechanism remains in place for third party non-text
    encodings.
    c72e4e6d
bz2_codec.py 2.2 KB