You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know exactly the purpose of this issue, but I'll describe a situation that I found using the join pipe and that deserves some discussion about it.
Generally, all shublang functions are executed through the iterable that they receive. But the join pipe is executed joining the iterable by a string. I think that instead of joining the iterable, it should apply the join operation on every item of the iterable.
In other words, instead of having the join function like this:
def join(iterable, separator=", "):
return (separator.join(builtins.map(str, x)) for x in iterable)
I came to this analyzing the following situation:
Every time that I get data from a previous pipe like jmespath, I need to add a first, before using the join pipe. Another problem with the current approach is that they are returning a string, instead of an iterable. I think that we should be careful with the grammar in situations like this, to keep the shublang terse.
No description provided.
The text was updated successfully, but these errors were encountered: