On Sun, Feb 3, 2019, 6:36 PM Greg Ewing
> But they only cover the special case of a function that takes
> elements from just one input vector. What about one that takes
> coresponding elements from two or more vectors?
>
What syntax would you like? Not necessarily new syntax per se, but what
calling convention.
I can think of a few useful cases.
vec1.replace("PLACEHOLDER", vec2)
Maybe that would transform one vector using the corresponding strings from
another vector.
What should happen if the vector length mismatch? I think this should
probably be an exception... unlike what zip() and itertools.zip_longest()
do. But maybe not.
concat = vec1 + vec2
Again the vector length question is there. But assuming the same length,
this seems like a reasonable way to get a new vector concatenating each
corresponding element.
Other uses? Are they different in general pattern?
>
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/