code: def bind(self, queue, exchange, routing_key='', nowait=True, arguments={},
               ticket=None, cb=None):
          '''
          bind to a queue.
          '''
          nowait = nowait and self.allow_nowait() and not cb
  
          args = Writer()
          args.write_short(ticket or self.default_ticket).\
              write_shortstr(queue).\
              write_shortstr(exchange).\
              write_shortstr(routing_key).\
              write_bit(nowait).\
              write_table(arguments)
          self.send_frame(MethodFrame(self.channel_id, 50, 20, args))
  
          if not nowait:
              self._bind_cb.append(cb)
              self.channel.add_synchronous_cb(self._recv_bind_okf bind(self, queue, exchange, routing_key='', nowait=True, arguments={},
               ticket=None, cb=None):
          '''
          bind to a queue.
          '''
          nowait = nowait and self.allow_nowait() and not cb
  
          args = Writer()
          args.write_short(ticket or self.default_ticket).\
              write_shortstr(queue).\
              write_shortstr(exchange).\
              write_shortstr(routing_key).\
              write_bit(nowait).\
              write_table(arguments)
          self.send_frame(MethodFrame(self.channel_id, 50, 20, args))
  
          if not nowait:
              self._bind_cb.append(cb)
              self.channel.add_synchronous_cb(self._recv_bind_ok)
docs: bind to a queue.