def cast_out(self, klass):
        """Interpret the content as a particular class."""
        if _debug: SequenceOfAny._debug("cast_out %r", klass)

        # make sure it is a list
        if not issubclass(klass, List):
            raise DecodingError("%r is not a list" % (klass,))

        # build a helper
        helper = klass()

        # make a copy of the tag list
        t = TagList(self.tagList[:])

        # let it decode itself
        helper.decode(t)

        # make sure everything was consumed
        if len(t) != 0:
            raise DecodingError("incomplete cast")

        return helper.value
def cast_out ( self , klass ) : if _debug : SequenceOfAny . _debug ( "cast_out %r" , klass ) if not issubclass ( klass , List ) : raise DecodingError ( "%r is not a list" % ( klass , ) ) helper = klass ( ) t = TagList ( self . tagList [ : ] ) helper . decode ( t ) if len ( t ) != 0 : raise DecodingError ( "incomplete cast" ) return helper . value
Interpret the content as a particular class.