def raw_decode(self, s, idx=0):
        r"""Decode a DSON document from ``s`` (a ``str`` or ``unicode``
        beginning with a DSON document) and return a 2-tuple of the Python
        representation and the index in ``s`` where the document ended.

        This can be used to decode a DSON document from a string that may
        have extraneous data at the end.

        """
        try:
            obj, end = self.scan_once(s, idx)
        except StopIteration:
            raise ValueError("No DSON object could be decoded")
        return obj, end
def raw_decode ( self , s , idx = 0 ) : try : obj , end = self . scan_once ( s , idx ) except StopIteration : raise ValueError ( "No DSON object could be decoded" ) return obj , end
r"""Decode a DSON document from ``s`` (a ``str`` or ``unicode``
        beginning with a DSON document) and return a 2-tuple of the Python
        representation and the index in ``s`` where the document ended.

        This can be used to decode a DSON document from a string that may
        have extraneous data at the end.