3 ms·
Sadly many things define the __or__ operator, including dicts and sets which are common to find in pipelines. (https://peps.python.org/pep-0584/ https://peps.py
by btown 1y ago
Sadly many things define the __or__ operator, including dicts and sets which are common to find in pipelines. (https://peps.python.org/pep-0584/ https://peps.python.org/pep-0584/ was a happy day for everyone but me!)
In practice, rshift gives a lot more flexibility! And you’d rarely chain after a numeric value.
- mananaysiempre 1y agoIt’s still useful in related situations. The following crime often finds its way into my $PYTHONSTARTUP: class more: def __ror__(self, other): import pydoc pydoc.pager(str(other)) more = more() and here the low precedence of | is useful.