Bash-like pipes in Python

Steven D'Aprano steve at pearwood.info
Wed Mar 16 11:39:47 EDT 2016


On Thu, 17 Mar 2016 02:22 am, Omar Abou Mrad wrote:

> Would be nice if this was possible:
> 
>>>> get_digits = Filter(str.isdigit) | Map(int)
>>>> 'kjkjsdf399834' | get_digits


Yes it would. I'll work on that.


> Also, how about using '>>' instead of '|' for "Forward chaining"

Any particular reason you prefer >> over | as the operator?




-- 
Steven




More information about the Python-list mailing list