(self)
return format % (name, channel, id, q, state)
x.__repr__() <==> repr(x)
x.__repr__() <==> repr(x)
x . __repr__ () < == > repr ( x )
def __repr__(self):
        "x.__repr__() <==> repr(x)"

        name = self.__class__.__name__

        channel = "/{0:s}".format(str(getattr(self, "channel", "")))

        q = len(self._queue)
        state = "R" if self.running else "S"

        pid = current_process().pid

        if pid:
            id = "%s:%s" % (pid, current_thread().getName())
        else:
            id = current_thread().getName()

        format = "<%s%s %s (queued=%d) [%s]>"
        return format % (name, channel, id, q, state)
def __repr__ ( self ) : name = self . __class__ . __name__ channel = "/{0:s}" . format ( str ( getattr ( self , "channel" , "" ) ) ) q = len ( self . _queue ) state = "R" if self . running else "S" pid = current_process ( ) . pid if pid : id = "%s:%s" % ( pid , current_thread ( ) . getName ( ) ) else : id = current_thread ( ) . getName ( ) format = "<%s%s %s (queued=%d) [%s]>" return format % ( name , channel , id , q , state )