tfchain/encoders/rivine.py
def add_byte(self, value):
        """
        Add an encoded iterateble value as a single byte.

        @param value: the value to be added as a single byte
        """
        if isinstance(value, int) or hasattr(value, '__int__'):
            self.add_int8(int(value))
        else:
            if isinstance(value, str):
                value = value.encode('utf-8')
            elif not isinstance(value, (bytes, bytearray)):
                raise ValueError(
                    "value of type {} cannot be added as a single byte".format(type(value)))
            if len(value) != 1:
                raise ValueError(
                    "a single byte has to be accepted, amount of bytes given: {}".format(len(value)))
            self._data += value

        Add an encoded iterateble value as a single byte.

        @param value: the value to be added as a single byte
        
Add an encoded iterateble value as a single byte.
Add an encoded iterateble value as a single byte .
def add_byte(self, value):
        if isinstance(value, int) or hasattr(value, '__int__'):
            self.add_int8(int(value))
        else:
            if isinstance(value, str):
                value = value.encode('utf-8')
            elif not isinstance(value, (bytes, bytearray)):
                raise ValueError(
                    "value of type {} cannot be added as a single byte".format(type(value)))
            if len(value) != 1:
                raise ValueError(
                    "a single byte has to be accepted, amount of bytes given: {}".format(len(value)))
            self._data += value
def add_byte ( self , value ) : if isinstance ( value , int ) or hasattr ( value , '__int__' ) : self . add_int8 ( int ( value ) ) else : if isinstance ( value , str ) : value = value . encode ( 'utf-8' ) elif not isinstance ( value , ( bytes , bytearray ) ) : raise ValueError ( "value of type {} cannot be added as a single byte" . format ( type ( value ) ) ) if len ( value ) != 1 : raise ValueError ( "a single byte has to be accepted, amount of bytes given: {}" . format ( len ( value ) ) ) self . _data += value
Add an encoded iterateble value as a single byte.
Add an encoded iterateble value as a single byte .
"""
        Add an encoded iterateble value as a single byte.

        @param value: the value to be added as a single byte
        """
self
value
the value to be added as a single byte
the value to be added as a single byte