ron819 commented on a change in pull request #4191: [AIRFLOW-3350] Explain how
to use Bitshift Composition with lists
URL: https://github.com/apache/incubator-airflow/pull/4191#discussion_r233748803
##########
File path: docs/concepts.rst
##########
@@ -240,6 +240,19 @@ We can put this all together to build a simple pipeline:
python_callable=lambda: print("GOODBYE!"))
)
+Bitshift can also be used with lists. For example:
+
+.. code:: python
+
+ op1 >> [op2, op3]
+
+is equivalent to:
+
+.. code:: python
+
+ op1.set_downstream(op2)
Review comment:
@xnuinside There is no difference.
All these 3 are equivalent:
1.
`op1.set_downstream([op2,op3])`
2.
```
op1.set_downstream(op2)
op1.set_downstream(op3)
```
3.
`op1 >> [op2, op3]`

The idea was to explain that lists are supported with bit-shift (3). I
wasn't trying to show all possible ways to set dependencies. Explaining about
(1) vs (2) might be better in setting up dependencies section
https://airflow.apache.org/tutorial.html#setting-up-dependencies
However if you feel strongly about it I will edit to include it here as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services