

@internationalizeDocstring
def decode(self, irc, msg, args, encoding, text):
    '<encoding> <text>\n\n        Returns an un-encoded form of the given text; the valid encodings are\n        available in the documentation of the Python codecs module:\n        <http://docs.python.org/library/codecs.html#standard-encodings>.\n        '
    if (encoding in 'base64 bz2 hex quopri uu zlib'):
        encoding += '_codec'
    if (encoding.endswith('_codec') and (encoding != 'base64_codec')):
        text = codecs.getdecoder('base64_codec')(args.encode())[0]
    try:
        decoder = codecs.getdecoder(encoding)
    except LookupError:
        irc.errorInvalid(_('encoding'), encoding)
    if (minisix.PY3 and (not isinstance(text, bytes))):
        text = text.encode()
    try:
        text = decoder(text)[0]
    except binascii.Error:
        irc.errorInvalid(_('base64 string'), s=_("Base64 strings must be a multiple of 4 in length, padded with '=' if necessary."))
        return
    if (minisix.PY2 and isinstance(text, unicode)):
        text = text.encode('utf-8')
    elif (minisix.PY3 and isinstance(text, bytes)):
        try:
            text = text.decode()
        except UnicodeDecodeError:
            pass
    irc.reply(text)

dataset/ETHPy150Open ProgVal/Limnoria/plugins/String/plugin.py String.decode/VarMisuse@66/188 `text`->`args`