tfchain/encoders/rivine.py
def add_array(self, value):
        """
        Encode an iterateble value as an array,
        as specified by the rivbin encoding specification.

        @param value: the iterateble object to be rivbin-encoded as an array
        """
        if isinstance(value, str):
            self._data += value.encode('utf-8')
        elif isinstance(value, (bytes, bytearray)):
            self._data += value
        else:
            try:
                for element in value:
                    self.add(element)
            except TypeError as e:
                raise TypeError("value cannot be encoded as an array: {}", e)

        Encode an iterateble value as an array,
        as specified by the rivbin encoding specification.

        @param value: the iterateble object to be rivbin-encoded as an array
        
Encode an iterateble value as an array,
as specified by the rivbin encoding specification.
Encode an iterateble value as an array as specified by the rivbin encoding specification .
def add_array(self, value):
        if isinstance(value, str):
            self._data += value.encode('utf-8')
        elif isinstance(value, (bytes, bytearray)):
            self._data += value
        else:
            try:
                for element in value:
                    self.add(element)
            except TypeError as e:
                raise TypeError("value cannot be encoded as an array: {}", e)
def add_array ( self , value ) : if isinstance ( value , str ) : self . _data += value . encode ( 'utf-8' ) elif isinstance ( value , ( bytes , bytearray ) ) : self . _data += value else : try : for element in value : self . add ( element ) except TypeError as e : raise TypeError ( "value cannot be encoded as an array: {}" , e )
Encode an iterateble value as an array,
as specified by the rivbin encoding specification.
Encode an iterateble value as an array as specified by the rivbin encoding specification .
"""
        Encode an iterateble value as an array,
        as specified by the rivbin encoding specification.

        @param value: the iterateble object to be rivbin-encoded as an array
        """
self
value
the iterateble object to be rivbin-encoded as an array
the iterateble object to be rivbin - encoded as an array