def decode(self, data):
        """ Decoder implementation of the Bencode algorithm 
        
        @param data: The encoded data
        @type data: str
        
        @note: This is a convenience wrapper for the recursive decoding
               algorithm, C{_decodeRecursive}
       
        @return: The decoded data, as a native Python type
        @rtype:  int, list, dict or str
        """
        if len(data) == 0:
            raise DecodeError, 'Cannot decode empty string'
        try:
            return self._decodeRecursive(data)[0]
        except __HOLE__ as e:
            raise DecodeError, e.message
dataset/ETHPy150Open lbryio/lbry/lbrynet/dht/encoding.py/Bencode.decode