소스 검색

fix docstring

Ask Solem 12 년 전
부모
커밋
71fcf71be3
1개의 변경된 파일11개의 추가작업 그리고 5개의 파일을 삭제
  1. 11 5
      celery/app/amqp.py

+ 11 - 5
celery/app/amqp.py

@@ -81,11 +81,17 @@ class Queues(dict):
     def add(self, queue, **kwargs):
         """Add new queue.
 
-        :param queue: Name of the queue.
-        :keyword exchange: Name of the exchange.
-        :keyword routing_key: Binding key.
-        :keyword exchange_type: Type of exchange.
-        :keyword \*\*options: Additional declaration options.
+        The first argument can either be a :class:`kombu.Queue` instance,
+        or the name of a queue.  If the former the rest of the keyword
+        arguments are ignored, and options are simply taken from the queue
+        instance.
+
+
+        :param queue: :class:`kombu.Queue` instance or name of the queue.
+        :keyword exchange: (if named) specifies exchange name.
+        :keyword routing_key: (if named) specifies binding key.
+        :keyword exchange_type: (if named) specifies type of exchange.
+        :keyword \*\*options: (if named) Additional declaration options.
 
         """
         if not isinstance(queue, Queue):