|
|
|
|
|
by blackrock
2214 days ago
|
|
Nice premise. But it makes the Python code look super complicated. It overloads map() with a lambda function, to compose function pipelining. Then, it introduces flow() as the new pipelining tool. But you have to use bind() on the last function call to return the value. Interesting concepts, but unless Python incorporates this as a standard feature, then this will remain a fringe idea. And it will add significant load to the development and maintenance process of Python programs. Admittedly, I like Elixir’s pipe forward concept |> That makes it super simple to do functional composition, and it will automatically bind and return the last value. Then getting the user profile, can be like so: user_profile =
userid |> get_request |> parse_json
|
|