-
Notifications
You must be signed in to change notification settings - Fork 0
Roadmap
Andy Brice edited this page Mar 22, 2018
·
3 revisions
More natural syntax for chaining methods and properties in pipelines. So:
[1,2,3,2,3,3,1,2,3,2] >> f.filter(3) >> ____.length >> f.increment # -> 5Becomes:
[1,2,3,2,3,3,1,2,3,2] >> f.filter(3).length >> f.increment # -> 5Import and initialize without needing to manually instantiate catchers or specify the default namespace.
from pypework import f, p, m, ____Chain together a sequence of pipeable functions with no input. To create a pipeline object which can be called or piped into later.
sanitize = f.lowercase >> f.replace(" ", "_")
"Lorem Ipsum" >> sanitize # -> "lorem_ipsum"
sanitize("Lorem Ipsum") # -> "lorem_ipsum"Enable the Partial Function Catcher automatically detect when input is to the first argument.
100 >> p.subtract(10) # -> 90
10 >> p.subtract(100, ____) # -> 90Merge the Function Catcher f and the Partial Function Catcher p into one class with no significant detriment to performance.
Recreate the F# pipeline syntax in Python without the need for added visual cruft.
"Lorem Ipsum" |> lowercase |> replace(" ", "_") # -> "lorem_ipsum""Lorem Ipsum"
|> lowercase
|> replace(" ", "_")
# -> "lorem_ipsum"(Until Python hopefully implements it natively, as is currently planned for JavaScript.)