[Python-ideas] [RFC] draft PEP: Dedicated infix operators for matrix multiplication and matrix power
Nick Coghlan
ncoghlan at gmail.com
Mon Mar 17 06:03:19 CET 2014
On 17 March 2014 13:46, Bruce Leban <bruce at leapyear.org> wrote:
> I also want to give a larger example to illustrate the kind of thing I think
> this operator would be useful for. SQLAlchemy has query objects where you
> can write something like
>
> some_query.filter(...).order_by(...).join(...)
>
>
> I image that this could use the @ operator:
>
> some_query @ filter(...) @ order_by(...) @ join(...)
There are plenty of existing left-associative operators that could be
used for that if Mike Bayer wanted (or could be convinced) to do so,
so I don't see how that observation is relevant to the question of
whether or not this particular proposal should be for a
right-associative operator.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas
mailing list