News for hackers. Stuff that matters.
Re:Diagram as Code by wmil on Thursday June 23, 2022 @11:38AM (#31850636)
Is it common for python libraries these days to overload the >> operator for oddball things like C++ does?

Not doing crap like that is one of the things that I loved about Python...

Re:Diagram as Code by shabble on Thursday June 23, 2022 @01:16PM (#31852220)
if you liked that, you'll love Plumbum[1] :)

[1] https://github.com/tomerfiliba/plumbum

Re:Diagram as Code by marginalia_nu on Thursday June 23, 2022 @01:21PM (#31852300)
I'm waiting for Guido to rush in any moment going "Stop right there, criminal scum! Nobody breaks the law on my watch!"
Re:Diagram as Code by tgarv on Thursday June 23, 2022 @12:30PM (#31851466)
Airflow uses it for task ordering within a DAG, but that's used in the parsing step that happens before/outside of any actual task execution so it's not really in the source code of tasks at least.
Re:Diagram as Code by Noumenon72 on Thursday June 23, 2022 @02:05PM (#31852927)
The Airflow 2.0 TaskFlow API[1] doesn't use the bitshift operators any more -- if you pass the result of one task into another, the second task is automatically downstream of the first. So it all just looks like function calls, despite using XComArgs behind the scenes.

1. https://airflow.apache.org/docs/apache-airflow/stable/tutori...

Re:Diagram as Code by neuronexmachina on Thursday June 23, 2022 @12:25PM (#31851385)
The Numpy and Tensorflow libraries do a fair bit of operator overloading, but it's IMHO more sensible than this example.
Re:Diagram as Code by detaro on Thursday June 23, 2022 @11:40AM (#31850664)
> Is it common for python libraries these days to overload the >> operator for oddball things like C++ does?

no