Hacker News new | ask | show | jobs
by pcarbonn 4472 days ago
I agree. I wish python had the capability to infix functions. Maybe the topic for a new PEP ?
1 comments

This is this[1] workaround.

I wonder if a whole set of infix matrix operations could be added to reduce the need to load numpy for simple tasks.

    A @* B
    A @. B
    A @+ B
[1] http://code.activestate.com/recipes/384122/
Yes, but making it part of the language would bring clear error messages in case of misuse, and would allow the use of a different token, e.g. ":", as in smalltalk