def write(self, value):
        """
        Appends bytes flat to the deque. So iterables will be unpacked.
        """
        if hasattr(value, '__iter__'):
            bytearray(value)
            self.extend(value)
        else:
            bytearray([value])
            self.append(value)
def write ( self , value ) : if hasattr ( value , '__iter__' ) : bytearray ( value ) self . extend ( value ) else : bytearray ( [ value ] ) self . append ( value )
Appends bytes flat to the deque. So iterables will be unpacked.