-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shell-style piping for transformers #358
Comments
Does python support that syntax? I never heard of that. On Wed, Jul 27, 2016 at 3:44 PM, dmitriy-serdyuk [email protected]
|
I like it a lot. Current syntax gets quite hairy. Is it going to be easy to do this without breaking literally everyone's I imagine we could make the first argument optional via a decorator like On Wed, Jul 27, 2016, 3:44 PM dmitriy-serdyuk [email protected]
|
@nouiz , it is a bit-wise or operator which can be overridden with I think about implementing a proxy object in the case if transformer was created without the datastream argument. The object should store a link to the transformer and create a "real" one as soon as the pipe is constructed. |
Why not make it always optional? It shouldn't break others' code. When an outside user decides to use piping syntax, she just rewrites her custom transformers. |
What if create a class factory method for lazy constructor? Like |
I propose to add a syntactic sugar to easier manipulate streams, we could use some infix operator to combine transformers (like
|
or>
).|
would look like linux piping:becomes
Less parenthesis, transformers are applied in the direct order.
Implementation looks very straightforward.
What do you guys think?
The text was updated successfully, but these errors were encountered: