On Fri, Feb 1, 2019, 6:16 PM Adrien Ricocotam <ricoco...@gmail.com wrote:

> A thing I thought about but I'm not satisfy is using the new
> matrix-multiplication operator:
>
>     my_string_vector @ str.lower
>
>     def compute_grad(a_student):
>         return "you bad"
>     my_student_vector @ compute_grad
>

This is certainly doable. But why would it be better than:

map(str.lower, my_string_vector)
map(compute_grad, my_student_vector)

These latter seem obvious, clear, and familiar.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to